Skip to content

Conversation

giladgray
Copy link
Contributor

Fixes #2735, Fixes #2092, Fixes #2091

Changes proposed in this pull request:

  • improve Classes.POPOVER_DISMISS behavior:
    • walk up DOM tree, looking for first DISMISS or DISMISS_OVERRIDE. only dismiss if DISMISS found. this makes for very easy dismiss overriding (and I think fixes some deep issues with the old impl).
    • ignore DISMISS clicks if they come from inside a disabled element.
  • new Popover captureDismiss prop (default true) invokes preventDefault() on Classes.POPOVER_DISMISS clicks. Popover now ignores dismiss clicks if default is prevented, so Popovers around a Popover captureDismiss will not close when an inner popover is dismissed.
  • MenuItem disables captureDismiss to preserve existing (desired) behavior where clicking a nested submenu closes the entire hierarchy.
  • add nice tests for all this new behavior

@blueprint-bot
Copy link

add nested popover & captureDismiss to example

Preview: documentation | landing | table

@blueprint-bot
Copy link

lint

Preview: documentation | landing | table

Copy link
Contributor

@themadcreator themadcreator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs and tests? yes please

@giladgray
Copy link
Contributor Author

we've got it all here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants