bustle / mobiledoc-kit

A toolkit for building WYSIWYG editors with Mobiledoc
https://bustle.github.io/mobiledoc-kit/demo/
MIT License
1.55k stars 150 forks source link

Bug Fix: don't modify tail.section if offset is 0 (aka tail.section is not selected) #712

Closed nikse closed 4 years ago

nikse commented 4 years ago

Fixes 2 bugs around double clicking a paragraph to modify/copy-paste it:

1) Issue: if a user double clicks to select and copy a paragraph that has a card following it, the card gets caught up in the copy and will also be pasted wherever you try to paste the paragraph Fix: rather than copying the card we now insert a new blank paragraph

2) Issue: if a user double clicks to select a paragraph to add section level markup and there is another paragraph following the selected one the second paragraph will also have the section level markup applied to it Fix: only apply markdown to selected sections

nikse commented 4 years ago

closing due to editor auto linting. will reopen in a new clean pr