Open Bug 1548802 Opened 5 years ago Updated 2 years ago

Merge devtools/client/shared/components/menu/utils.js in devtools/client/framework/menu.js

Categories

(DevTools :: Framework, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

Details

Follow up to Bug 1543940.

After Bug 1543940, menu/utils.js will only provide one feature missing from the base menu.js file: opening menus on a target Element rather than at x, y coordinates.

    const button = options.button;
    const rect = button.getBoundingClientRect();
    const defaultView = button.ownerDocument.defaultView;
    screenX = rect.left + defaultView.mozInnerScreenX;
    screenY = rect.bottom + defaultView.mozInnerScreenY;

If we add this feature to menu.js, it feels like we should be able to have only one menu file.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Framework
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.