mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Koenig - Fixed error when pasting text with a whole paragraph selected
refs https://github.com/TryGhost/Ghost/issues/9505
This commit is contained in:
parent
8d0050df67
commit
ff96eb019f
1 changed files with 5 additions and 3 deletions
|
@ -131,10 +131,12 @@ export default Component.extend({
|
||||||
if (section) {
|
if (section) {
|
||||||
let containerRect = this.element.parentNode.getBoundingClientRect();
|
let containerRect = this.element.parentNode.getBoundingClientRect();
|
||||||
let selectedElement = section.renderNode.element;
|
let selectedElement = section.renderNode.element;
|
||||||
let selectedElementRect = selectedElement.getBoundingClientRect();
|
if (selectedElement) {
|
||||||
let top = selectedElementRect.top - containerRect.top;
|
let selectedElementRect = selectedElement.getBoundingClientRect();
|
||||||
|
let top = selectedElementRect.top - containerRect.top;
|
||||||
|
|
||||||
this.set('top', top);
|
this.set('top', top);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue