Open axelson opened 7 years ago
@axelson: button gets highlighted if character before cursor has the style. I find it correct. Is the behavior you are noticing different from this. Can you share a recording ?
Yes that is the current behavior. But I find that wrong from a UX perspective. I think that the button state should reflect the style that the next character typed will have. This is similar to how Google Docs and Pages work. Otherwise after you type bold text if you press the bold button it stays depressed even though it did have an effect (which feels broken).
The button states aren't always accurate until the user begins typing. So if I click bold and type then the bold button is depressed, but if I then click bold again the bold button stays depressed! But when I start typing again the bold button is no longer depressed and the text does not come out bold.
Checked on Google Chrome on the demo page: https://jpuri.github.io/react-draft-wysiwyg/