Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Bold / Italic / Strike / Underline buttons don't work correctly #19

Open
Avtje opened this issue Apr 8, 2013 · 3 comments · May be fixed by #76
Open

Bold / Italic / Strike / Underline buttons don't work correctly #19

Avtje opened this issue Apr 8, 2013 · 3 comments · May be fixed by #76

Comments

@Avtje
Copy link

Avtje commented Apr 8, 2013

When you don't have text selected and you try to activate more than 1 of these buttons, it only activates the last one you clicked.

However, shortcuts do seem to work in this situation?

@gojko
Copy link
Contributor

gojko commented Apr 10, 2013

I've looked into this a bit and I don't know how to fix it. It's not critical enough for me to spend more time on it, but if anyone else would like to give it a shot I'll merge the fix in

@longlostnick
Copy link

A followup to this is that if you don't have any text selected, clicking an already active button doesn't deactivate it. I'm going to take a look tonight, maybe I can fix both of these problems.

@livemixlove
Copy link

Any progress on this? I'm also having the problem with " if you don't have any text selected, clicking an already active button doesn't deactivate it". Thanks!

alanpca referenced this issue in drc-devs/bootstrap-wysiwyg Jun 12, 2013
* Fixes steveathon#19
* Problem: addRange or removeAllRanges kills the browser command states.
* Store cache in commandCache
* Add updateCommandCache and restoreCommandCache methods
* Add support for command-with-arg buttons to be in an active state
* Update command cache when running execCommand
* Store and then update selected commands when selecting a toolbar button
* Create the command cache by looking up the buttons that are in the DOM, set the default value to false
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants