Closed Bug 1563686 Opened 4 months ago Closed 3 months ago

netmonitor menus position is wrong when DevTools are zoomed

Categories

(DevTools :: Netmonitor, defect, P3)

defect

Tracking

(firefox69 verified)

VERIFIED FIXED
Firefox 69
Tracking Status
firefox69 --- verified

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(1 file)

STRs:

  • open DevTools
  • zoom in the DevTools UI (ctrl/cmd +)
  • select netmonitor
  • click on the throttlin or HAR menu-button

Expected result: the menu should be displayed near the button
Actual result: the menu is displayed in the middle of the screen

:nchevobbe also mentioned the issue was affecting other devtools menus such as the main "..." menu, but I cannot reproduce this so far.

For the netmonitor menus, the fix is to replace

menu.popup(screenX, screenY, window.document);

with

menu.popupWithZoom(screenX, screenY, window.document);

at https://searchfox.org/mozilla-central/rev/040aa667f419932adf425d92c7438f03230ad96b/devtools/client/shared/components/menu/utils.js#62

Duplicate of this bug: 1274551

popupWithZoom is only used in the TabBar to position the popup correctly next to an anchor. Some code in there is duplicated from devtools/client/shared/components/menu/utils.js. Let's remove popupWithZoom and introduce a popupAtTarget instead that will take care of taking the zoom into account.

Already tested via toolbox menus in devtools/client/framework/test/browser_toolbox_zoom_popup.js
Could open a follow up to allow for other anchor points than bottom-left.

Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9efab90160b4
Introduce menu.popupAtTarget to fix zoom issues in netmonitor menus r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
QA Whiteboard: [qa-69b-p2]

Reproduced issue with 69.0a1 (2019-07-05).
Confirmed fix with 69.0b6 on Win_10, macOS_10.13, Ubuntu 16.04.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.