@angular/material 16.1.0-rc.0 → 16.1.0

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/fesm2022/tabs.mjs CHANGED
@@ -1819,7 +1819,10 @@ class _MatTabLinkBase extends _MatTabLinkMixinBase {
1819
1819
  this._tabNavBar.focusIndex = this._tabNavBar._items.toArray().indexOf(this);
1820
1820
  }
1821
1821
  _handleKeydown(event) {
1822
- if (this._tabNavBar.tabPanel && event.keyCode === SPACE) {
1822
+ if (this.disabled && (event.keyCode === SPACE || event.keyCode === ENTER)) {
1823
+ event.preventDefault();
1824
+ }
1825
+ else if (this._tabNavBar.tabPanel && event.keyCode === SPACE) {
1823
1826
  this.elementRef.nativeElement.click();
1824
1827
  }
1825
1828
  }