1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00

Fixed slash menu positioning bug

no refs.

- fixed visual bug that made Slash menu appear on top of the text
This commit is contained in:
Peter Zimon 2020-04-21 11:12:47 +02:00
parent db49cd8d20
commit 9129f3bb31

View file

@ -27,6 +27,7 @@ export default Component.extend({
_openRange: null,
_query: '',
_onWindowMousedownHandler: null,
_yOffset: 16,
// closure actions
replaceWithCardSection() {},
@ -232,7 +233,7 @@ export default Component.extend({
let containerRect = this.element.parentNode.getBoundingClientRect();
let selectedElement = section.renderNode.element;
let selectedElementRect = selectedElement.getBoundingClientRect();
let top = selectedElementRect.top + selectedElementRect.height - containerRect.top;
let top = selectedElementRect.top + selectedElementRect.height - containerRect.top + this._yOffset;
this.set('top', top);
}