You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed this issue with DropdownButton but it applies to any element that has DropMenu set.
Sometimes it happens that menu position is at the bottom of the page instead near the button. In that case, menu element is missing top and left style properties, and also does not have dui-dd-* class set.
What I was able to find is that this happens when parent of element that has DropMenu (or the element itself) is removed, and appended again. And one more condition for this to happen is: menu must not be activated before first removal.
It sounds complicated, but it happens all the time when I'm switching views by setting content on AppLayout.
Here is the example and instructions to reproduce:
There are two buttons, Remove and Add to remove/add DivElement which is parent of Button that has DropMenu set.
First we clik Remove to remove it, then Add to set it back again, and then when we clik on Button. The menu is wrongly positioned at the bottom.
There is a case when this will not happen, so we can start from begining:
First we clik on Button and menu opens nicely positioned. Then we click Remove and Add. After that, we click on Button again, and menu still opens properly.
The text was updated successfully, but these errors were encountered:
vegegoku
changed the title
strange menu positioning
Detach then attach the menu target element before showing the menu once will append the menu to the document body.
Oct 27, 2023
I noticed this issue with DropdownButton but it applies to any element that has DropMenu set.
Sometimes it happens that menu position is at the bottom of the page instead near the button. In that case, menu element is missing top and left style properties, and also does not have dui-dd-* class set.
What I was able to find is that this happens when parent of element that has DropMenu (or the element itself) is removed, and appended again. And one more condition for this to happen is: menu must not be activated before first removal.
It sounds complicated, but it happens all the time when I'm switching views by setting content on AppLayout.
Here is the example and instructions to reproduce:
There are two buttons, Remove and Add to remove/add DivElement which is parent of Button that has DropMenu set.
First we clik Remove to remove it, then Add to set it back again, and then when we clik on Button. The menu is wrongly positioned at the bottom.
There is a case when this will not happen, so we can start from begining:
First we clik on Button and menu opens nicely positioned. Then we click Remove and Add. After that, we click on Button again, and menu still opens properly.
The text was updated successfully, but these errors were encountered: