@fundamental-ngx/cdk 0.43.31 → 0.43.33

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.
@@ -1941,8 +1941,20 @@ class OnlyDigitsDirective {
1941
1941
  /** @hidden */
1942
1942
  onKeyDown(e) {
1943
1943
  if (
1944
- // Allow: Delete, Backspace, Tab, Escape, Enter, End, Home, Arrow Left, Arrow Right
1945
- KeyUtil.isKeyCode(e, [DELETE, BACKSPACE, TAB, ESCAPE, ENTER, END, HOME, LEFT_ARROW, RIGHT_ARROW]) ||
1944
+ // Allow: Delete, Backspace, Tab, Escape, Enter, End, Home, Arrow Left, Arrow Right, Arrow Up, Arrow Down
1945
+ KeyUtil.isKeyCode(e, [
1946
+ DELETE,
1947
+ BACKSPACE,
1948
+ TAB,
1949
+ ESCAPE,
1950
+ ENTER,
1951
+ END,
1952
+ HOME,
1953
+ LEFT_ARROW,
1954
+ RIGHT_ARROW,
1955
+ UP_ARROW,
1956
+ DOWN_ARROW
1957
+ ]) ||
1946
1958
  // Allow: Ctrl+(A/C/V/X) and Cmd+(A/C/V/X) (Mac)
1947
1959
  (KeyUtil.isKeyCode(e, [A, C, V, X]) && (e.ctrlKey || e.metaKey))) {
1948
1960
  return; // let it happen, don't do anything
@@ -3057,12 +3069,7 @@ class FocusableItemDirective {
3057
3069
  setTabbable(state) {
3058
3070
  this._zone.runOutsideAngular(() => {
3059
3071
  this._tabbable = state;
3060
- if (this._tabbable) {
3061
- this._renderer2.setAttribute(this.elementRef.nativeElement, 'tabindex', '0');
3062
- }
3063
- else {
3064
- this._renderer2.removeAttribute(this.elementRef.nativeElement, 'tabindex');
3065
- }
3072
+ this._renderer2.setAttribute(this.elementRef.nativeElement, 'tabindex', this._tabbable ? '0' : '-1');
3066
3073
  if (state) {
3067
3074
  this._enableTabbableElements();
3068
3075
  }
@@ -3440,7 +3447,9 @@ function scrollIntoView(element, position) {
3440
3447
  */
3441
3448
  const elRect = element.getBoundingClientRect();
3442
3449
  const topEl = document.elementFromPoint(elRect.left, elRect.top);
3443
- if (!element.isSameNode(topEl) && topEl) {
3450
+ if (!element.isSameNode(topEl) &&
3451
+ topEl &&
3452
+ element.getBoundingClientRect().top !== topEl.getBoundingClientRect().top) {
3444
3453
  scrollableParent.scrollBy({ top: elRect.top - topEl.getBoundingClientRect().bottom });
3445
3454
  }
3446
3455
  }