1. 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?

Discussion in 'Resolved Bug Reports' started by seebs, Feb 25, 2015.

  1. seebs

    seebs Member

    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 and HotCopper like this.
  2. Optic

    Optic Well-Known Member

    I can confirm this happens for me too. Tried it on Chrome and Firefox:

    I suppose the workaround would be the user just needs to do an extra backspace:
  3. Mike

    Mike XenForo Developer Staff Member

    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.

Share This Page