Bug 1533693, just compare the drop point against event.clientY instead of using a complicated check involving scroll positions, fixes the subfolder not opening in bookmarks menu when dragging over it, r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D22751

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Neil Deakin 2019-03-11 14:14:14 +00:00
parent 563869ddbd
commit a62440428f

View File

@ -82,17 +82,8 @@
if (elt.localName == "menupopup")
elt = elt.parentNode;
// Calculate positions taking care of arrowscrollbox
let scrollbox = this._scrollBox;
let thisY = this.getBoundingClientRect().y;
let scrollboxY = scrollbox.getBoundingClientRect().y;
let innerScrollboxY = scrollbox.scrollbox.getBoundingClientRect().y;
let eventY = aEvent.layerY + (scrollboxY - thisY);
let scrollboxOffset = innerScrollboxY - (scrollboxY - thisY);
let eventY = aEvent.clientY;
let {y: eltY, height: eltHeight} = elt.getBoundingClientRect();
eltY -= scrollboxOffset;
if (!elt._placesNode) {
// If we are dragging over a non places node drop at the end.