Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude trailing block for type toggling if at zero offset
Resolves facebookarchive#86. In cases where the user triple-clicks on a block, then toggles the block type, it feels weird to have the trailing block also change block type. The `SelectionState` resulting from the triple-click is correct, but to improve the interaction here, let's discard the trailing block for this modifier. Test Plan: View rich.html, add three lines of text. - Triple-click first line, toggle H1. Verify that only the first line toggles. - Repeat with second line, verify that only the second line toggles. - Repeat with third line (no trailing block), verify that only the third line toggles. Also select across multiple blocks by dragging, verify that toggling block types properly affects all visibly selected blocks.
- Loading branch information