My simple question is: Can popups if add-ons somehow determinate whether they are shown in the overflow menu (i.e. that ) or as a “usual” button in the toolbar, when clicked.
The reason is my add-on wants to set a (max)height on the html/body elements only when shown as a “usual popup”, so the scrollbar when resizing the popup with a large height does not appear, while the same CSS option limits the popup in the overflow menu from getting resized at all.
So basically I’d have to set a CSS property conditionally (via JS, if needed, that would not be a problem).
If you want to know the details of what I want to accomplish, see this issue:
They can only try to know based on their viewport, since the width is fixed when in the overflow menu, however height is unlimited or limited similary to a stand alone popup. Note that you’d also want to avoid limiting the height for Android - if you don’t explicitly remove Android support.
Hmm, but can one determinate (preferrably) without resizing the window, to determinate whether a size if fixed in JS?
Yes good point, but I’ll do. The height limit is just height: 100% (and max-height: 100% and overflow: hidden). This prevents the scrollbar without setting a limit in pixels.
However, as said, even this prevents re-sizing the popup in the overflow menu. (whereas it does not when the popup is “alone” not in the overflow menu)
There is a max-width: 348px on .PanelUI-subView in the overflow list that appears to be assigned using a script. However, I don’t know where that comes from.