@jsenv/navi 0.29.220 → 0.29.222
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/dev/jsenv_navi.js +40 -19
- package/dist/dev/jsenv_navi.js.map +4 -4
- package/dist/jsenv_navi.js +40 -19
- package/dist/jsenv_navi.js.map +4 -4
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -45653,15 +45653,27 @@ const handlePressOnOutsideRegion = (
|
|
|
45653
45653
|
* answers it. The one popup where that cannot hold is the modal dialog, where
|
|
45654
45654
|
* the browser has already made everything behind inert before this runs.
|
|
45655
45655
|
*
|
|
45656
|
-
* `
|
|
45657
|
-
*
|
|
45658
|
-
*
|
|
45659
|
-
*
|
|
45660
|
-
*
|
|
45661
|
-
*
|
|
45662
|
-
*
|
|
45663
|
-
* it
|
|
45664
|
-
*
|
|
45656
|
+
* `pressEventType` says which event IS the press, and the two callers want
|
|
45657
|
+
* opposite ones:
|
|
45658
|
+
*
|
|
45659
|
+
* - `"pointerdown"` for a popup with no wall: a page with no wall over it is
|
|
45660
|
+
* a page whose own elements arbitrate their presses, and cancelling a
|
|
45661
|
+
* `pointerdown` — what a drag source and a control keeping the focus where
|
|
45662
|
+
* it is both do — suppresses every compatibility mouse event that would have
|
|
45663
|
+
* followed it. The press happens, reaches its target, and no `mousedown` is
|
|
45664
|
+
* ever dispatched for it. Reading the pointer event is reading the press
|
|
45665
|
+
* itself, whatever anything does with it afterwards, and it is the same
|
|
45666
|
+
* event the drag and surface detectors read.
|
|
45667
|
+
* - `"mousedown"` for the modal dialog, whose native `::backdrop` exists to
|
|
45668
|
+
* spend the press. The page's controls act on `mousedown`, and on a touch
|
|
45669
|
+
* screen that is not the same moment as `pointerdown`: the compatibility
|
|
45670
|
+
* mouse events are synthesized at `touchend` and hit-tested again then.
|
|
45671
|
+
* Closing on `pointerdown` takes the `::backdrop` away before that second
|
|
45672
|
+
* hit-test, so the `mousedown` lands on whatever the page holds under the
|
|
45673
|
+
* finger, and one tap both dismisses the dialog and presses the page. Read
|
|
45674
|
+
* on `mousedown`, the wall is still up when the press the page acts on is
|
|
45675
|
+
* aimed, and it catches it. Nothing behind a modal wall can cancel that
|
|
45676
|
+
* press, since nothing behind it hears the `pointerdown` at all.
|
|
45665
45677
|
*
|
|
45666
45678
|
* Capture phase, so a handler downstream that stops propagation cannot keep
|
|
45667
45679
|
* the popup open either — the press is still outside whatever is made of it.
|
|
@@ -45670,7 +45682,11 @@ const handlePressOnOutsideRegion = (
|
|
|
45670
45682
|
*/
|
|
45671
45683
|
const armOutsidePressClose = (
|
|
45672
45684
|
popupEl,
|
|
45673
|
-
{
|
|
45685
|
+
{
|
|
45686
|
+
openController,
|
|
45687
|
+
pointerInteractionOutsideEffect,
|
|
45688
|
+
pressEventType = "pointerdown",
|
|
45689
|
+
},
|
|
45674
45690
|
) => {
|
|
45675
45691
|
const onDocumentPointerDown = (pointerDownEvent) => {
|
|
45676
45692
|
if (pointerDownEvent.button !== 0) {
|
|
@@ -45727,11 +45743,11 @@ const armOutsidePressClose = (
|
|
|
45727
45743
|
isCancel: pointerInteractionOutsideEffect === "cancel",
|
|
45728
45744
|
});
|
|
45729
45745
|
};
|
|
45730
|
-
document.addEventListener(
|
|
45746
|
+
document.addEventListener(pressEventType, onDocumentPointerDown, {
|
|
45731
45747
|
capture: true,
|
|
45732
45748
|
});
|
|
45733
45749
|
return () => {
|
|
45734
|
-
document.removeEventListener(
|
|
45750
|
+
document.removeEventListener(pressEventType, onDocumentPointerDown, {
|
|
45735
45751
|
capture: true,
|
|
45736
45752
|
});
|
|
45737
45753
|
};
|
|
@@ -58815,7 +58831,12 @@ const useDialogProps = props => {
|
|
|
58815
58831
|
if ((isModal || !backdrop) && (pointerInteractionOutsideEffect === "close" || pointerInteractionOutsideEffect === "cancel")) {
|
|
58816
58832
|
addCleanup(armOutsidePressClose(dialogEl, {
|
|
58817
58833
|
openController,
|
|
58818
|
-
pointerInteractionOutsideEffect
|
|
58834
|
+
pointerInteractionOutsideEffect,
|
|
58835
|
+
// A modal wall spends the press the page acts on (mousedown); a
|
|
58836
|
+
// local dialog with no wall lets that same press through
|
|
58837
|
+
// (pointerdown). See armOutsidePressClose for why the two differ on
|
|
58838
|
+
// a touch screen.
|
|
58839
|
+
pressEventType: isModal ? "mousedown" : "pointerdown"
|
|
58819
58840
|
}));
|
|
58820
58841
|
}
|
|
58821
58842
|
return closeEvent => {
|
|
@@ -63828,7 +63849,7 @@ const css$x = /* css */`@layer navi {
|
|
|
63828
63849
|
overflow: clip visible;
|
|
63829
63850
|
}
|
|
63830
63851
|
|
|
63831
|
-
& .navi_list_scroll_container {
|
|
63852
|
+
& > .navi_list_scroll_container {
|
|
63832
63853
|
--x-corner-top-left-radius: initial;
|
|
63833
63854
|
--x-corner-top-right-radius: initial;
|
|
63834
63855
|
--x-corner-bottom-right-radius: initial;
|
|
@@ -63848,13 +63869,13 @@ const css$x = /* css */`@layer navi {
|
|
|
63848
63869
|
max-height: none;
|
|
63849
63870
|
overflow: visible;
|
|
63850
63871
|
|
|
63851
|
-
& .navi_list_scroll_container {
|
|
63872
|
+
& > .navi_list_scroll_container {
|
|
63852
63873
|
max-height: none;
|
|
63853
63874
|
overflow: visible;
|
|
63854
63875
|
}
|
|
63855
63876
|
}
|
|
63856
63877
|
|
|
63857
|
-
&:not([navi-hover-while-scrolling]) .navi_list:is([navi-scrolling] *) {
|
|
63878
|
+
&:not([navi-hover-while-scrolling]) > .navi_list_scroll_container > .navi_list:is([navi-scrolling] *) {
|
|
63858
63879
|
pointer-events: none;
|
|
63859
63880
|
}
|
|
63860
63881
|
|
|
@@ -63869,7 +63890,7 @@ const css$x = /* css */`@layer navi {
|
|
|
63869
63890
|
&[data-expand-y] {
|
|
63870
63891
|
--list-max-height: none;
|
|
63871
63892
|
|
|
63872
|
-
& .navi_list_scroll_container {
|
|
63893
|
+
& > .navi_list_scroll_container {
|
|
63873
63894
|
flex: 1;
|
|
63874
63895
|
min-height: 0;
|
|
63875
63896
|
}
|
|
@@ -63984,7 +64005,7 @@ const css$x = /* css */`@layer navi {
|
|
|
63984
64005
|
.navi_list_container[data-horizontal] {
|
|
63985
64006
|
--list-max-height: none;
|
|
63986
64007
|
|
|
63987
|
-
& .navi_list_virtual_filler {
|
|
64008
|
+
& > .navi_list_scroll_container > .navi_list > .navi_list_virtual_filler {
|
|
63988
64009
|
width: var(--size-to-fill, 0px);
|
|
63989
64010
|
height: 100%;
|
|
63990
64011
|
}
|
|
@@ -65815,7 +65836,7 @@ const getScrollerEl = (listContainerEl, scroller, horizontal) => {
|
|
|
65815
65836
|
return el || document.scrollingElement;
|
|
65816
65837
|
}
|
|
65817
65838
|
if (scroller !== "parent") {
|
|
65818
|
-
return listContainerEl.querySelector(
|
|
65839
|
+
return listContainerEl.querySelector(`:scope > .navi_list_scroll_container`);
|
|
65819
65840
|
}
|
|
65820
65841
|
const axis = horizontal ? "x" : "y";
|
|
65821
65842
|
let element = listContainerEl;
|