@camaradesuk/m3e-angular 0.2.0-alpha.1 → 0.2.0-alpha.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.
@@ -4228,12 +4228,21 @@ class MatExpNavigationRail {
4228
4228
  !this._rescuingPeekFocus &&
4229
4229
  !(previous instanceof Node && panel.contains(previous)) &&
4230
4230
  this._canPeek() &&
4231
- // User focus only: programmatic focus (no input yet) and touch taps never peek.
4231
+ // User focus only. Programmatic focus before any input and touch taps never peek. After
4232
+ // mouse use, focus peeks only with the pointer over the rail: a click there, not focus that
4233
+ // code (CDK restoring focus as a dialog closes) moves in while the pointer is elsewhere.
4232
4234
  (this._modality.mostRecentModality === 'keyboard' ||
4233
- this._modality.mostRecentModality === 'mouse')) {
4235
+ (this._modality.mostRecentModality === 'mouse' && this._pointerOverRail()))) {
4234
4236
  this._clearPeekTimers();
4235
4237
  this._peekRequested.set(true);
4236
4238
  }
4239
+ else if (this._modality.mostRecentModality === 'keyboard' &&
4240
+ previous instanceof Node &&
4241
+ panel.contains(previous)) {
4242
+ // A keyboard move inside the rail keeps the peek, even if the pointer has just left.
4243
+ clearTimeout(this._peekCloseTimer);
4244
+ this._peekCloseTimer = undefined;
4245
+ }
4237
4246
  }
4238
4247
  /** @internal */
4239
4248
  _onWindowBlur() {
@@ -4516,6 +4525,14 @@ class MatExpNavigationRail {
4516
4525
  if (this.peeking() && !event.defaultPrevented)
4517
4526
  this._endPeek();
4518
4527
  }
4528
+ /**
4529
+ * Whether a mouse or pen pointer is over the drawer now. Read live from `:hover`, which the
4530
+ * browser keeps current when the drawer resizes under a still pointer (a peek ending), where no
4531
+ * `pointerleave` arrives.
4532
+ */
4533
+ _pointerOverRail() {
4534
+ return this._drawerElement().nativeElement.matches(':hover');
4535
+ }
4519
4536
  _endPeek() {
4520
4537
  this._clearPeekTimers();
4521
4538
  this._peekRequested.set(false);