Closed timojaask closed 3 years ago
Interestingly in the latter case, the DOM element ends up having a non-breaking space between the OOOOOs.
Already when the space after the first OOOOO is input by pressing the spacebar, it's actually an
which is then converted to a normal space after typing more characters. In case of paste, it will remaing
. Oh the quirks.
To add more spin, this weirdness happens with Chrome and Safari but not Firefox. On Firefox the space is just an ordinary space.
Hopefully the fix is acceptable. Would appreciate some testing after the fix is in production. Should be in a few minutes.
In the screenshot above, both sticky notes have exactly the same text. The first one was entered entirely by typing "OOOOO OOOOO". The second one was entered by typing the first word "OOOOO " and then pasting from clipboard the second word "OOOOO".
I'm guessing that the text measurement step is only done when you type, and omitted when pasting?