UX: ensure whitespace isn't removed when playing with quotes

This commit is contained in:
Régis Hanol 2018-05-18 19:32:10 +02:00
parent ba0dd5889d
commit e209faa6cf
1 changed files with 4 additions and 1 deletions

View File

@ -78,7 +78,10 @@ export default Ember.Component.extend({
const $quoteButton = this.$();
// remove the marker
markerElement.parentNode.removeChild(markerElement);
const parent = markerElement.parentNode;
parent.removeChild(markerElement);
// merge back all text nodes so they don't get messed up
parent.normalize();
// work around Safari that would sometimes lose the selection
if (isSafari) {