Skip to content

[Tooltip] Participate in dismissable stack #1314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 11, 2022

Conversation

benoitgrelard
Copy link
Contributor

@benoitgrelard benoitgrelard commented Apr 8, 2022

Closes #1290

🔥 Needs docs updates 🔥

  • add onEscapeKeyDown prop
  • add onPointerDownOutside prop

@benoitgrelard benoitgrelard requested a review from andy-hook as a code owner April 8, 2022 15:44
@benoitgrelard benoitgrelard added the PR: Documentation Needed This PR warrants a documentation update label Apr 8, 2022
Copy link
Contributor

@andy-hook andy-hook left a comment

Choose a reason for hiding this comment

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

Works great!

@@ -251,7 +251,6 @@ const TooltipTrigger = React.forwardRef<TooltipTriggerElement, TooltipTriggerPro
onMouseEnter={composeEventHandlers(props.onMouseEnter, context.onTriggerEnter)}
onMouseLeave={composeEventHandlers(props.onMouseLeave, context.onClose)}
onMouseDown={composeEventHandlers(props.onMouseDown, () => {
context.onClose();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice to see this behaviour inherited from DismissableLayer now 👍

@benoitgrelard benoitgrelard merged commit 884bfd3 into main Apr 11, 2022
@benoitgrelard benoitgrelard deleted the 1290-tooltip-dismissable-layer branch April 11, 2022 10:37
luisorbaiceta pushed a commit to luisorbaiceta/primitives that referenced this pull request Jul 21, 2022
* [Tooltip] Participate in dismissable stack

Closes radix-ui#1290

* Update yarn.lock

* Update packages/react/tooltip/src/Tooltip.tsx

Co-authored-by: Andy Hook <[email protected]>

Co-authored-by: Andy Hook <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Documentation Needed This PR warrants a documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tooltip] Make use of DismissableLayer to take part in layering and give more flexibility
2 participants