enterprise-ng
enterprise-ng copied to clipboard
Popupmenu: Overlapping popup menus after context menu element is removed
Describe the bug If we have a popup menu opened as a context menu, opening another popup menu as a context menu (via right-click) will close the first menu. However, if we have a list of context menus linked to a popup menu, and one of the menus are removed, going through the same process as earlier will not close the first popup menu when the second menu is opened, resulting in overlapping menus. To Reproduce Steps to reproduce the behavior:
- Go to this repro example.
- Right click one of the context menu items, observe a popupmenu opening.
- Right click the widget backdrop, observe the first popupmenu closing and a new popupmenu opening.
- Right click one of the visible context menu items and select ("Remove whale"), observe that the menu element will be removed.
- Right click one of the remaining context menu items, observe a popupmenu opening.
- Right click the widget backdrop, observe another popupmenu opening without closing the first menu.
Expected behavior The open popupmenu should close when another popupmenu is opened.
Version
- ids-enterprise: Observed in 4.62, Homepages. (To reproduce there, do the same thing with the standard Mingle notes widget).
Screenshots GIF Example source code.
I do see the issue but wondering from a UX standpoint if its a bit of overuse of context menu having several menus on the same widget doing different things? Just mentioning as you could perhaps consider buttons for some actions.
But we will have a look when we can
Hi Tim, I see your point and agree to some extent. As far as I can tell, we have had this functionality for the widget for many years, so changing the behavior would be impactful. My counterpoint is that it probably shouldn't be too difficult to extend whatever method(s) is/are checking for '.is-open', and to remove that class from all open popupmenus, when it is relevant?
I.e., I don't think this needs to be fixed in particular for this problem, but more likely this problem just means that closing open popupmenus is not rigorous enough.
Yeah i assume this is some sort of but but will be a bit tricky maybe to track down. But we can try
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.
This issue was closed because it has been inactive for 14 days since being marked as stale.