You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unify the behavior around backspacing iOS lists and quotes (#194)
Previous PRs brought a bit of mayhem to lists and quotes on iOS in terms
of their behavior consistency;
- the added utils that removed styles when all characters of a line were
removed messed with the fact that lists and quotes shouldn't do that. A
zero width space should appear there. Added a check in these utils for
these styles.
- after fixing the above, zero width spaces still didn't appear in the
first line because empty input "reset attributes" check was running
first. Changed their order.
- cleaned up and fixed the logic for handling backspaces within lists.
Now backspace that is visibly done on the list/quote marker only removes
style, keeping the whole line intact
- also fixed one edge case to the above behavior, which resulted in the
style being removed because the attributes magically weren't preserved
// if the backspace removes the whole content of a paragraph - do the thing
32
-
if(NSEqualRanges(nonNewlineRange, range)) {
37
+
// if the backspace removes the whole content of a paragraph (possibly more but has to start where the paragraph starts), we remove the typing attributes
0 commit comments