@zag-js/popover 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -919,19 +919,19 @@ function machine(ctx = {}) {
|
|
|
919
919
|
ctx2.pointerdownNode = null;
|
|
920
920
|
},
|
|
921
921
|
focusContent(ctx2) {
|
|
922
|
-
|
|
922
|
+
raf(() => {
|
|
923
923
|
var _a;
|
|
924
924
|
(_a = dom.getContentEl(ctx2)) == null ? void 0 : _a.focus();
|
|
925
925
|
});
|
|
926
926
|
},
|
|
927
927
|
setInitialFocus(ctx2) {
|
|
928
|
-
|
|
928
|
+
raf(() => {
|
|
929
929
|
var _a;
|
|
930
930
|
(_a = dom.getInitialFocusEl(ctx2)) == null ? void 0 : _a.focus();
|
|
931
931
|
});
|
|
932
932
|
},
|
|
933
933
|
focusTrigger(ctx2) {
|
|
934
|
-
|
|
934
|
+
raf(() => {
|
|
935
935
|
var _a;
|
|
936
936
|
(_a = dom.getTriggerEl(ctx2)) == null ? void 0 : _a.focus();
|
|
937
937
|
});
|
|
@@ -966,7 +966,7 @@ function machine(ctx = {}) {
|
|
|
966
966
|
if (!elementAfterTrigger || elementAfterTrigger === button)
|
|
967
967
|
return;
|
|
968
968
|
evt.preventDefault();
|
|
969
|
-
|
|
969
|
+
raf(() => elementAfterTrigger == null ? void 0 : elementAfterTrigger.focus());
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
});
|