Lundalogik / lime-elements

Provides reusable web components for Lime CRM
https://lundalogik.github.io/lime-elements/versions/latest
Other
38 stars 12 forks source link

Fix text editor typing fast bug #3002

Closed LawrenceBorst closed 3 weeks ago

LawrenceBorst commented 1 month ago

Fixes Lundalogik/crm-feature#4142

Review:

Browsers tested:

(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)

Windows:

Linux:

macOS:

Mobile:

github-actions[bot] commented 1 month ago

Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3002/

LawrenceBorst commented 1 month ago

Not written here, but Pelle mentioned we should flush the debounce on blur

adrianschmidt commented 1 month ago

With what's currently in https://github.com/Lundalogik/lime-elements/pull/2999, I can only replicate the "disappearing" empty lines, and I say "disappearing" in quotes, because that's only happening because the editor is set to use markdown, and in the markdown mode, blank lines are not preserved (try saving with blank lines in the text, and you'll see they are removed). You could rather argue that the bug is that it's possible to get the wysiwyg editor to preserve the blank lines, instead of immediately removing them as soon as they are added.

If the editor is used in html mode, blank lines do not disappear, but more than than, if you are in markdown mode, and add a code block, and then add blank lines in there, they don't disappear, because inside code block, empty lines should be preserved.

john-traas commented 1 month ago

We'll look into it further. I have a suspicion as well that this won't be needed after the always-dirty fix.

john-traas commented 3 weeks ago

Closing this as the issue was fixed here