Skip to content

Commit

Permalink
fix(tooltip): close on pointer down
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Sep 5, 2023
1 parent 5cbd0db commit 19c76c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/curly-rabbits-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zag-js/tooltip": patch
---

Fix issue where tooltip doesn't respect `closeOnPointerDown: false`
1 change: 1 addition & 0 deletions packages/machines/tooltip/src/tooltip.connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function connect<T extends PropTypes>(state: State, send: Send, normalize
send("CLICK")
},
onFocus() {
if (state.event.type === "POINTER_DOWN") return
send("FOCUS")
},
onBlur() {
Expand Down

4 comments on commit 19c76c1

@vercel
Copy link

@vercel vercel bot commented on 19c76c1 Sep 5, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

zag-nextjs – ./examples/next-ts

zag-two.vercel.app
zag-nextjs-git-main-chakra-ui.vercel.app
zag-nextjs-chakra-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 19c76c1 Sep 5, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

zag-solid – ./examples/solid-ts

zag-solid-git-main-chakra-ui.vercel.app
zag-solid-chakra-ui.vercel.app
zag-solid.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 19c76c1 Sep 5, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 19c76c1 Sep 5, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

zag-vue – ./examples/vue-ts

zag-vue.vercel.app
zag-vue-git-main-chakra-ui.vercel.app
zag-vue-chakra-ui.vercel.app

Please sign in to comment.