@jsenv/navi 0.29.357 → 0.29.359

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.
@@ -9954,7 +9954,21 @@ const createControlInteraction = (
9954
9954
  failingManagedInteraction.reportInteractivity({ event });
9955
9955
  return;
9956
9956
  }
9957
- reportedConstraint = interactionFailedConstraintInfo.constraint;
9957
+ const constraint = interactionFailedConstraintInfo.constraint;
9958
+ if (reportedConstraint === constraint) {
9959
+ // Pressed again while it still says why it refuses: that press is "got
9960
+ // it", not a question — the explanation goes rather than being repeated
9961
+ // (the press lands on the callout's own anchor, so it is no press outside
9962
+ // and nothing else would take it down).
9963
+ debugInteraction(
9964
+ event,
9965
+ `reportInteractivity (${interactionFailedConstraintInfo.name}) pressed again, dismiss`,
9966
+ );
9967
+ callout.removeOpenToken(INTERACTION_TOKEN, event);
9968
+ reportedConstraint = null;
9969
+ return;
9970
+ }
9971
+ reportedConstraint = constraint;
9958
9972
  debugInteraction(
9959
9973
  event,
9960
9974
  `reportInteractivity (${interactionFailedConstraintInfo.name})`,
@@ -9971,6 +9985,14 @@ const createControlInteraction = (
9971
9985
  anchorElement: interactionFailedConstraintInfo.target,
9972
9986
  event,
9973
9987
  skipFocus: true,
9988
+ // A refusal explains the press that just happened: once the page moves
9989
+ // on, so does the explanation.
9990
+ closeByScroll: true,
9991
+ // Dismissed (press outside, scroll): nothing is on screen anymore, and
9992
+ // the next press is a question again.
9993
+ onClose: () => {
9994
+ reportedConstraint = null;
9995
+ },
9974
9996
  });
9975
9997
  };
9976
9998