miztroh-zz / wysiwyg-e

A what-you-see-is-what-you-get editor created with Polymer
85 stars 18 forks source link

Make selection part of the undo / redo history #183

Closed maxiplay closed 7 years ago

maxiplay commented 7 years ago

Hey,

I selected some text, CTRL+X to delete, CTRL+V to paste (bug or not for bolding ?)

And after I do CTLR+Z to cancel the paste.

The selector don't go to the good position.

https://drive.google.com/file/d/0Bz9a1ywlc9N8UGs1SFVVUnNnbTQ/view

miztroh-zz commented 7 years ago

The bold is not a bug. Again, it happens because the cursor is inside of a heading and then you're pasting content into it.

You are correct that wysiwyg-e does not currently restore selection when the undo / redo state changes. I will add this as an enhancement.

miztroh-zz commented 7 years ago

@maxiplay Take a look at the master build. Selection is now included as part of the undo / redo history, so this should take care of the issue.

maxiplay commented 7 years ago

Can I test on webcomponents.org ?

miztroh-zz commented 7 years ago

Yep, the fix was included in release v2.0.3.