Closed Bug 1367776 Opened 4 years ago Closed 4 years ago
Calculate the maximum height of panelmultiview before the panel is displayed
59 bytes, text/x-review-board-request
If the main view of a panelmultiview takes up more vertical space than is available, or if the same happens in a Photon subview, the height of the popup panel isn't limited correctly. This affects the non-Photon main view after bug 1009116.
Summary: Calculate the maximum height of panelmultiview before the panel it is displayed → Calculate the maximum height of panelmultiview before the panel is displayed
Paolo, it'd super useful if you could tell me how I can get into the state where I can implement and test a fix? Is it as simple as moving the browser window partly off-screen below and opening the app menu?
I can do that by moving the menu anchor to the middle of the screen, then opening the developer subview in the Photon version.
I found out what seems to be a reliable method to get the correct position, even with multiple screens. The code had to borrow the following logic from "tabbrowser.xml", because "window.screen" might return the wrong screen, making the math a little bit more complicated: https://dxr.mozilla.org/mozilla-central/rev/39d5cc0fda5e16c49a59d29d4ca186a5534cc88b/browser/base/content/tabbrowser.xml#7073-7094 We have to know the height of the arrow in advance, since the panel isn't open when we compute the height. I think we can set a value for each platform, but if they turn out to be similar, we might go for a single value for all platforms.
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Comment on attachment 8873122 [details] Bug 1367776 - Calculate the maximum height of panelmultiview before the panel is displayed. https://reviewboard.mozilla.org/r/144596/#review148752
Attachment #8873122 - Flags: review?(gijskruitbosch+bugs) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/7af15f9b3cfa Calculate the maximum height of panelmultiview before the panel is displayed. r=Gijs
You need to log in before you can comment on or make changes to this bug.