@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.
@@ -7191,6 +7191,40 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7191
7191
  input: this.filterChangeHandler.bind(this)
7192
7192
  });
7193
7193
  this.filterObj.appendTo('#' + this.element.id + '_filter');
7194
+ this.keyboardModule = new KeyboardEvents(this.filterObj.element, {
7195
+ keyAction: this.filterKeyAction.bind(this),
7196
+ keyConfigs: this.keyConfigs,
7197
+ eventName: 'keydown'
7198
+ });
7199
+ };
7200
+ DropDownTree.prototype.filterKeyAction = function (e) {
7201
+ var _this = this;
7202
+ var eventArgs = {
7203
+ cancel: false,
7204
+ event: e
7205
+ };
7206
+ this.trigger('keyPress', eventArgs, function (observedArgs) {
7207
+ if (!observedArgs.cancel) {
7208
+ switch (e.action) {
7209
+ case 'altUp':
7210
+ if (_this.isPopupOpen) {
7211
+ _this.hidePopup();
7212
+ }
7213
+ break;
7214
+ case 'shiftTab':
7215
+ addClass([_this.inputWrapper], [INPUTFOCUS]);
7216
+ break;
7217
+ case 'moveDown':
7218
+ e.preventDefault();
7219
+ _this.filterObj.element.blur();
7220
+ var focusedElement = _this.treeObj.element.querySelector('li');
7221
+ if (focusedElement) {
7222
+ focusedElement.focus();
7223
+ }
7224
+ break;
7225
+ }
7226
+ }
7227
+ });
7194
7228
  };
7195
7229
  DropDownTree.prototype.filterChangeHandler = function (args) {
7196
7230
  var _this = this;
@@ -7691,7 +7725,6 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
7691
7725
  }
7692
7726
  break;
7693
7727
  case 'shiftTab':
7694
- case 'tab':
7695
7728
  if (_this.isPopupOpen) {
7696
7729
  _this.hidePopup();
7697
7730
  }
@@ -8410,13 +8443,16 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
8410
8443
  }
8411
8444
  else {
8412
8445
  var oldFocussedNode = _this.treeObj.element.querySelector('.e-node-focus');
8413
- focusedElement = _this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
8446
+ focusedElement = _this.treeObj.element.querySelector('li[tabindex="0"]:not(.e-disable):not(.e-prevent)') ||
8447
+ _this.treeObj.element.querySelector('li:not(.e-disable):not(.e-prevent)');
8414
8448
  if (oldFocussedNode && oldFocussedNode !== focusedElement) {
8415
8449
  oldFocussedNode.setAttribute('tabindex', '-1');
8416
8450
  removeClass([oldFocussedNode], 'e-node-focus');
8417
8451
  }
8418
8452
  }
8419
- focusedElement.focus();
8453
+ if (!_this.allowFiltering) {
8454
+ focusedElement.focus();
8455
+ }
8420
8456
  addClass([focusedElement], ['e-node-focus']);
8421
8457
  }
8422
8458
  if (_this.treeObj.checkedNodes.length > 0) {