@syncfusion/ej2-dropdowns 26.2.9 → 26.2.10

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.
@@ -7029,6 +7029,39 @@ let DropDownTree = class DropDownTree extends Component {
7029
7029
  input: this.filterChangeHandler.bind(this)
7030
7030
  });
7031
7031
  this.filterObj.appendTo('#' + this.element.id + '_filter');
7032
+ this.keyboardModule = new KeyboardEvents(this.filterObj.element, {
7033
+ keyAction: this.filterKeyAction.bind(this),
7034
+ keyConfigs: this.keyConfigs,
7035
+ eventName: 'keydown'
7036
+ });
7037
+ }
7038
+ filterKeyAction(e) {
7039
+ const eventArgs = {
7040
+ cancel: false,
7041
+ event: e
7042
+ };
7043
+ this.trigger('keyPress', eventArgs, (observedArgs) => {
7044
+ if (!observedArgs.cancel) {
7045
+ switch (e.action) {
7046
+ case 'altUp':
7047
+ if (this.isPopupOpen) {
7048
+ this.hidePopup();
7049
+ }
7050
+ break;
7051
+ case 'shiftTab':
7052
+ addClass([this.inputWrapper], [INPUTFOCUS]);
7053
+ break;
7054
+ case 'moveDown':
7055
+ e.preventDefault();
7056
+ this.filterObj.element.blur();
7057
+ let focusedElement = this.treeObj.element.querySelector('li');
7058
+ if (focusedElement) {
7059
+ focusedElement.focus();
7060
+ }
7061
+ break;
7062
+ }
7063
+ }
7064
+ });
7032
7065
  }
7033
7066
  filterChangeHandler(args) {
7034
7067
  if (!isNullOrUndefined(args.value)) {
@@ -7520,7 +7553,6 @@ let DropDownTree = class DropDownTree extends Component {
7520
7553
  }
7521
7554
  break;
7522
7555
  case 'shiftTab':
7523
- case 'tab':
7524
7556
  if (this.isPopupOpen) {
7525
7557
  this.hidePopup();
7526
7558
  }
@@ -8232,13 +8264,16 @@ let DropDownTree = class DropDownTree extends Component {
8232
8264
  }
8233
8265
  else {
8234
8266
  const oldFocussedNode = this.treeObj.element.querySelector('.e-node-focus');
8235
- focusedElement = this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
8267
+ focusedElement = this.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable):not(.e-prevent)') ||
8268
+ this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
8236
8269
  if (oldFocussedNode && oldFocussedNode !== focusedElement) {
8237
8270
  oldFocussedNode.setAttribute('tabindex', '-1');
8238
8271
  removeClass([oldFocussedNode], 'e-node-focus');
8239
8272
  }
8240
8273
  }
8241
- focusedElement.focus();
8274
+ if (!this.allowFiltering) {
8275
+ focusedElement.focus();
8276
+ }
8242
8277
  addClass([focusedElement], ['e-node-focus']);
8243
8278
  }
8244
8279
  if (this.treeObj.checkedNodes.length > 0) {