@indigina/ui-kit 1.1.190 → 1.1.191

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.
@@ -4999,6 +4999,27 @@ class KitTabsComponent {
4999
4999
  * Defines the reference to the tabs content
5000
5000
  */
5001
5001
  this.tabs = contentChildren(KitTabComponent);
5002
+ this.interceptInputKeys = (event) => {
5003
+ const target = event.target;
5004
+ const isTextInput = [
5005
+ 'INPUT',
5006
+ 'TEXTAREA',
5007
+ ].includes(target.nodeName) || target.hasAttribute('contenteditable');
5008
+ const keysToProtect = [
5009
+ 'ArrowLeft',
5010
+ 'ArrowRight',
5011
+ 'Backspace',
5012
+ ];
5013
+ if (isTextInput && keysToProtect.includes(event.key)) {
5014
+ event.stopImmediatePropagation();
5015
+ }
5016
+ };
5017
+ }
5018
+ ngOnInit() {
5019
+ document.addEventListener('keydown', this.interceptInputKeys, true);
5020
+ }
5021
+ ngOnDestroy() {
5022
+ document.removeEventListener('keydown', this.interceptInputKeys, true);
5002
5023
  }
5003
5024
  onTabSelect(event) {
5004
5025
  this.tabSelected.emit({