@zag-js/popover 0.0.0-dev-20230522212155 → 0.0.0-dev-20230523135722
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.
|
@@ -203,14 +203,14 @@ function machine(userContext) {
|
|
|
203
203
|
},
|
|
204
204
|
setInitialFocus(ctx2) {
|
|
205
205
|
raf(() => {
|
|
206
|
-
dom.getInitialFocusEl(ctx2)?.focus();
|
|
206
|
+
dom.getInitialFocusEl(ctx2)?.focus({ preventScroll: true });
|
|
207
207
|
});
|
|
208
208
|
},
|
|
209
209
|
restoreFocusIfNeeded(ctx2, evt) {
|
|
210
210
|
if (!evt.restoreFocus)
|
|
211
211
|
return;
|
|
212
212
|
raf(() => {
|
|
213
|
-
dom.getTriggerEl(ctx2)?.focus();
|
|
213
|
+
dom.getTriggerEl(ctx2)?.focus({ preventScroll: true });
|
|
214
214
|
});
|
|
215
215
|
},
|
|
216
216
|
invokeOnOpen(ctx2) {
|
package/dist/index.js
CHANGED
|
@@ -383,14 +383,14 @@ function machine(userContext) {
|
|
|
383
383
|
},
|
|
384
384
|
setInitialFocus(ctx2) {
|
|
385
385
|
(0, import_dom_query3.raf)(() => {
|
|
386
|
-
dom.getInitialFocusEl(ctx2)?.focus();
|
|
386
|
+
dom.getInitialFocusEl(ctx2)?.focus({ preventScroll: true });
|
|
387
387
|
});
|
|
388
388
|
},
|
|
389
389
|
restoreFocusIfNeeded(ctx2, evt) {
|
|
390
390
|
if (!evt.restoreFocus)
|
|
391
391
|
return;
|
|
392
392
|
(0, import_dom_query3.raf)(() => {
|
|
393
|
-
dom.getTriggerEl(ctx2)?.focus();
|
|
393
|
+
dom.getTriggerEl(ctx2)?.focus({ preventScroll: true });
|
|
394
394
|
});
|
|
395
395
|
},
|
|
396
396
|
invokeOnOpen(ctx2) {
|
package/dist/index.mjs
CHANGED
package/dist/popover.machine.js
CHANGED
|
@@ -261,14 +261,14 @@ function machine(userContext) {
|
|
|
261
261
|
},
|
|
262
262
|
setInitialFocus(ctx2) {
|
|
263
263
|
(0, import_dom_query2.raf)(() => {
|
|
264
|
-
dom.getInitialFocusEl(ctx2)?.focus();
|
|
264
|
+
dom.getInitialFocusEl(ctx2)?.focus({ preventScroll: true });
|
|
265
265
|
});
|
|
266
266
|
},
|
|
267
267
|
restoreFocusIfNeeded(ctx2, evt) {
|
|
268
268
|
if (!evt.restoreFocus)
|
|
269
269
|
return;
|
|
270
270
|
(0, import_dom_query2.raf)(() => {
|
|
271
|
-
dom.getTriggerEl(ctx2)?.focus();
|
|
271
|
+
dom.getTriggerEl(ctx2)?.focus({ preventScroll: true });
|
|
272
272
|
});
|
|
273
273
|
},
|
|
274
274
|
invokeOnOpen(ctx2) {
|
package/dist/popover.machine.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/popover",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230523135722",
|
|
4
4
|
"description": "Core logic for the popover widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"focus-trap": "7.4.1",
|
|
30
|
-
"@zag-js/anatomy": "0.0.0-dev-
|
|
31
|
-
"@zag-js/aria-hidden": "0.0.0-dev-
|
|
32
|
-
"@zag-js/core": "0.0.0-dev-
|
|
33
|
-
"@zag-js/dom-query": "0.0.0-dev-
|
|
34
|
-
"@zag-js/utils": "0.0.0-dev-
|
|
35
|
-
"@zag-js/dismissable": "0.0.0-dev-
|
|
36
|
-
"@zag-js/tabbable": "0.0.0-dev-
|
|
37
|
-
"@zag-js/popper": "0.0.0-dev-
|
|
38
|
-
"@zag-js/remove-scroll": "0.0.0-dev-
|
|
39
|
-
"@zag-js/types": "0.0.0-dev-
|
|
30
|
+
"@zag-js/anatomy": "0.0.0-dev-20230523135722",
|
|
31
|
+
"@zag-js/aria-hidden": "0.0.0-dev-20230523135722",
|
|
32
|
+
"@zag-js/core": "0.0.0-dev-20230523135722",
|
|
33
|
+
"@zag-js/dom-query": "0.0.0-dev-20230523135722",
|
|
34
|
+
"@zag-js/utils": "0.0.0-dev-20230523135722",
|
|
35
|
+
"@zag-js/dismissable": "0.0.0-dev-20230523135722",
|
|
36
|
+
"@zag-js/tabbable": "0.0.0-dev-20230523135722",
|
|
37
|
+
"@zag-js/popper": "0.0.0-dev-20230523135722",
|
|
38
|
+
"@zag-js/remove-scroll": "0.0.0-dev-20230523135722",
|
|
39
|
+
"@zag-js/types": "0.0.0-dev-20230523135722"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"clean-package": "2.2.0"
|