Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Fix backspacing into a block from offset 0 in Firefox #338
In Firefox, pressing backspace when the cursor is positioned after a comment node will only remove that node, which effectively deletes nothing.
Minimal test case: Open
Possibly related bug: https://bugzilla.mozilla.org/show_bug.cgi?id=685445
Trix, as of 759e62d, detects the mutation / input mismatch and reparses the document resulting in no deletion and the cursor jumping to the end of the block.
Avoids a contenteditable bug in Firefox that could result in duplicated <trix-editor>s. Tracked down and reported here: https://bugzilla.mozilla.org/show_bug.cgi?id=1332924. Somewhat related: #338