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
authorNeil Deakin <neil@mozilla.com>
Mon, 11 Mar 2019 14:14:14 +0000
changeset 521582 7b997d966c3c5fad733d2255a4d57aff2237112a
parent 521581 7d1ef08b4ceab853ac395b0c36e046252ddc8730
child 521583 3504d6975a6d345d89fd6dff5409d99a75115889
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1533693
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
browser/components/places/content/menu.xml
--- a/browser/components/places/content/menu.xml
+++ b/browser/components/places/content/menu.xml
@@ -77,27 +77,18 @@
 
             var dropPoint = { ip: null, folderElt: null };
 
             // The element we are dragging over
             let elt = aEvent.target;
             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.
               dropPoint.ip = new PlacesInsertionPoint({
                 parentId: PlacesUtils.getConcreteItemId(resultNode),
                 parentGuid: PlacesUtils.getConcreteItemGuid(resultNode),
               });
               // We can set folderElt if we are dropping over a static menu that