Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

clicking Bold and Italic buttons on empty line has no effect #229

Open
analyst74 opened this issue Feb 11, 2016 · 4 comments
Open

clicking Bold and Italic buttons on empty line has no effect #229

analyst74 opened this issue Feb 11, 2016 · 4 comments
Labels
Milestone

Comments

@analyst74
Copy link

This problem can be reproduced on demo.html, open in chrome, click to an empty line, and click bold/italic button. Those buttons are supposed to be highlighted (see tinymce homepage example), but are not.

@deeg
Copy link
Contributor

deeg commented Feb 15, 2016

Just curious, do you see the same effect on this plunker with the latest code?

I don't see the bug you describe.

@deeg
Copy link
Contributor

deeg commented Feb 16, 2016

I'm sorry, I was using an old version of TinyMCE on one of my plunkers. I do see the issue, thanks for reporting.

@deeg deeg added the bug label Feb 16, 2016
@deeg deeg added this to the 1.0.0 milestone Feb 17, 2016
@viveleroi
Copy link

Looks like this is related to calls to ed.save(). When commenting out that call in the debouncedUpdate method, the button stays active as expected.

@viveleroi
Copy link

A bit more info...

TinyMCE's save method fires an event:

if (!args.no_events) {
  self.fire('SaveContent', args);
}

I'm not sure why, but it's this event trigger which leads to button state resets.

A temporary workaround could be to disable that event:

ed.save({ no_events: true });

But that likely prevents SaveContent listeners we do want from receiving it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants