@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.mjs
CHANGED
|
@@ -896,19 +896,19 @@ function machine(ctx = {}) {
|
|
|
896
896
|
ctx2.pointerdownNode = null;
|
|
897
897
|
},
|
|
898
898
|
focusContent(ctx2) {
|
|
899
|
-
|
|
899
|
+
raf(() => {
|
|
900
900
|
var _a;
|
|
901
901
|
(_a = dom.getContentEl(ctx2)) == null ? void 0 : _a.focus();
|
|
902
902
|
});
|
|
903
903
|
},
|
|
904
904
|
setInitialFocus(ctx2) {
|
|
905
|
-
|
|
905
|
+
raf(() => {
|
|
906
906
|
var _a;
|
|
907
907
|
(_a = dom.getInitialFocusEl(ctx2)) == null ? void 0 : _a.focus();
|
|
908
908
|
});
|
|
909
909
|
},
|
|
910
910
|
focusTrigger(ctx2) {
|
|
911
|
-
|
|
911
|
+
raf(() => {
|
|
912
912
|
var _a;
|
|
913
913
|
(_a = dom.getTriggerEl(ctx2)) == null ? void 0 : _a.focus();
|
|
914
914
|
});
|
|
@@ -943,7 +943,7 @@ function machine(ctx = {}) {
|
|
|
943
943
|
if (!elementAfterTrigger || elementAfterTrigger === button)
|
|
944
944
|
return;
|
|
945
945
|
evt.preventDefault();
|
|
946
|
-
|
|
946
|
+
raf(() => elementAfterTrigger == null ? void 0 : elementAfterTrigger.focus());
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
});
|