diff --git a/.changeset/curly-rabbits-sit.md b/.changeset/curly-rabbits-sit.md new file mode 100644 index 0000000000..5fa70ba6f1 --- /dev/null +++ b/.changeset/curly-rabbits-sit.md @@ -0,0 +1,5 @@ +--- +"@zag-js/tooltip": patch +--- + +Fix issue where tooltip doesn't respect `closeOnPointerDown: false` diff --git a/packages/machines/tooltip/src/tooltip.connect.ts b/packages/machines/tooltip/src/tooltip.connect.ts index b945d7fc5a..cac9ce927c 100644 --- a/packages/machines/tooltip/src/tooltip.connect.ts +++ b/packages/machines/tooltip/src/tooltip.connect.ts @@ -44,6 +44,7 @@ export function connect(state: State, send: Send, normalize send("CLICK") }, onFocus() { + if (state.event.type === "POINTER_DOWN") return send("FOCUS") }, onBlur() {