Closed rommni closed 1 month ago
It seems to me, the problem is adding a MenuButton not to a Menu, but to a Window. Seems a bit like driving a car not into a garage, but into a lake (for example).
OK ok I thought it was the correct way to add a button which show a menu when you click on it, how should I do that ?
OK ok I thought it was the correct way to add a button which show a menu when you click on it, how should I do that ?
I am not sure anymore if my comment above is correct and it should be possible to add the MenuButton directly to the HBox() layout. Sorry about my flippant comment above.
However, this does work: https://tinyurl.com/yyesj34v (will need some layout adjustments). Unfortunately the demobrowser is broken right now, otherwise that would be a good place to check how this is intended to be done. Work is on the way to fix the demobrowser ...
Describe the bug When you try to add a
qx.ui.menu.Button
element in aqx.ui.window.Window
you see in console an error during render, and the button doesn't seem to be render correctlyPlayground link https://tinyurl.com/y3s4pl4f If you run the example and look at your dev console you will see the following error:
qx.ui.core.queue.Layout: Error in the 'Layout' queue:TypeError: Cannot read property 'getLayoutParent' of null TypeError: Cannot read property 'getLayoutParent' of null
From my test it seems that maybe the error appear at the moment when ButtonLayout call the __getMenu function in renderLayout (qx/ui/menu/ButtonLayout.js:66)
Maybe we can add a check in
__getMenu
to check if widget is null however I don't know if it could cause other problems and I don't know if it's the problem itself or just a symptom of the problem