XUL Popup Improvements
The popup reworking patch finally made it in yesterday without any performance regressions. This features a number of improvements to the popup code.
- Popups now open as well as fire events and change attributes asynchronously in some cases, making popups less crash prone.
- Popups are kept track of better, avoiding the popups that hang on the screen and cannot be closed issue.
- Some reflow improvements which make popups not jump about on the screen. Also, hopefully, the size of a popup or tooltip is determined properly, or at least more likely to be accurate.
- Some decomtamination and removal of much duplicated code.
- An openPopup and openPopupAtScreen method to use instead of the confusing showPopup. (showPopup is still supported though). The former opens a popup relative to another node while the latter opens a popup at a specific screen position.
- A <panel> element is added which is designed for popups that are not menus. XUL didn’t offically support this before. <menupopup> should be used for menus and <tooltip> for tooltips. The <popup> element is deprecated (as has always been the case) and is equivalent to <menupopup>.
There’s still some work to be done with popups. For instance, focus navigation in popups is a bit broken. This could be a tricky fix as it requires fixing some focus code while avoiding becoming the focus module owner.
Testing of popups is much appreciated. I know about the tooltips in html being the wrong size issue. The fix for this is to remove a workaround so that’s a good thing.
July 6th, 2007 at 4:03 am
Theme authors could have used some warning that was coming, replacing the depreciated .
And a small issue report:
In Tools/Options/Contents/Colors, click on a colorpicker to open the colors panel (with updated Walnut theme this looks nice!), and the click again on the same colorpicker button to close it again. So far so good. Click again, and you would expect to pop it again, but no … For other popups this works, so may be the colorpicker needs some specific attention?
July 16th, 2007 at 1:50 am
I felt confused after read about Bug 279703, I don’t know clearly what is used for? I write a xul file with , and find its behavior is so strange. Not like a tooltip, not a popup and not a menu yet. Could you give me a more clear description about ? Thanks.