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
In the last major release, we removed the css overlay approach to handling showing/hiding the SelectMenu to support places where a SelectMenu might be nested inside of an absolutely positioned element.
The JS approach checks if the click happens outside of the details element that wraps the SelectMenu to determine whether or not to close the menu.
In another application that uses Primer React Components, React Portals are used to open menus in places other than where they are triggered. Because of this, the menu content no longer has a details parent, and clicking on items inside of the menu (such as the filter input) closes the menu when it should not.
Should we support using menus inside of Portals? Is this an accessibility concern that we should intentionally not support?
Would it make sense to add an onOutsideClick callback to SelectMenu so that users can opt out of the default SelectMenu outside click handling? Will this mess up the internal state?
Follow up items
Research accessibility of using menus inside of React Portals
In the last major release, we removed the css overlay approach to handling showing/hiding the SelectMenu to support places where a SelectMenu might be nested inside of an absolutely positioned element.
The JS approach checks if the click happens outside of the
details
element that wraps the SelectMenu to determine whether or not to close the menu.In another application that uses Primer React Components, React Portals are used to open menus in places other than where they are triggered. Because of this, the menu content no longer has a
details
parent, and clicking on items inside of the menu (such as the filter input) closes the menu when it should not.onOutsideClick
callback toSelectMenu
so that users can opt out of the default SelectMenu outside click handling? Will this mess up the internal state?Follow up items
onOutsideClick
approachcc @lerebear
The text was updated successfully, but these errors were encountered: