Koenig - Fixed error when pasting text with a whole paragraph selected

refs https://github.com/TryGhost/Ghost/issues/9505
This commit is contained in:
Kevin Ansfield 2018-04-13 16:42:20 +01:00
parent 8d0050df67
commit ff96eb019f

View File

@ -131,10 +131,12 @@ export default Component.extend({
if (section) {
let containerRect = this.element.parentNode.getBoundingClientRect();
let selectedElement = section.renderNode.element;
let selectedElementRect = selectedElement.getBoundingClientRect();
let top = selectedElementRect.top - containerRect.top;
if (selectedElement) {
let selectedElementRect = selectedElement.getBoundingClientRect();
let top = selectedElementRect.top - containerRect.top;
this.set('top', top);
this.set('top', top);
}
}
},