• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed ctrl/cmd-i in rich text editor can become confused?

#1
So, while messing with ctrl-i, I somehow got the forum into a state where the rich text editor bar did not show the italicized-i as selected, but typing would produce text in italics (and cause it to start showing as selected).

Okay, reproducer: Type "foo^ibar", backspace over the "bar". When you delete the "b", the italicized-i deselects. But if you type something, it's italics and the italicized-i reselects. To fix this, hit ^i again, and the italicized-i selects; then type something and behold as it turns out not to be in italics and the italicized-i deselects.
 

Optic

Well-known member
#2
I can confirm this happens for me too. Tried it on Chrome and Firefox:
test123.gif

I suppose the workaround would be the user just needs to do an extra backspace:
test123-extra.gif
 

Mike

XenForo developer
Staff member
#3
The browser actually removes the tag for the italics, but keeps its internal state that way. Previously, we had just detected the actual DOM for this case, but I'm now checking the browser state on backspace as well.