Jump to content
  • 0

BUG: typing certain characters causes formatting loss even in unrelated parts of note



I'm on Evernote for Mac Version 6.3 (452832 Direct).
Steps to reproduce:
  1. Clip this page.
  2. Type two dashes and some text at the end of a line of code (pre-formatted text)
  3. Watch the pre-formatting go away even in parts of the note I did not touch.
I also found the reason. In the original note, code formatting was achieved with a <code> tag. When I typed the dashes, the editor wraps that tag around a <span> tag, which causes HTML rendering engines (both Chrome and the Evernote editor itself) to stop rendering that block of text as pre-formatted. 


I can see why losing the pre-formatting is necessary when the text is highlighted, because Evernote notes are backed by HTML and HTML doesn’t have a way to display text that's both preformatted and highlighted. But why did editing one place cause all text in other places that's wrapped in the same HTML tag to also change? Perhaps the backend is using an XML/HTML selector that’s selecting too many elements when it should only select one? And then, perhaps there’s an event listener that listens to changes to elements matching that selector and wraps the changed text in a <span> tag? (That seems plausible to me because the new “unified experience" editor is supposedly JavaScript-powered now.)
In that case, this wouldn’t just be an obscure bug that’s only triggered when someone types two dashes (or a number and a dot, like "1.") in a code block - it’d be at least a medium-impact bug that’s triggered whenever that event listener is triggered and causes destructive changes that are difficult to notice and difficult to undo if not noticed promptly.  
Link to comment

0 replies to this idea

Recommended Posts

There have been no replies to this idea yet


This topic is now archived and is closed to further replies.

  • Create New...