@syncfusion/ej2-dropdowns 24.2.7 → 24.2.8

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.
@@ -18573,21 +18573,6 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
18573
18573
  this.isPopupOpen = false;
18574
18574
  this.isCollided = false;
18575
18575
  this.lineBreak = false;
18576
- this.keyConfigure = {
18577
- tab: 'tab',
18578
- enter: '13',
18579
- escape: '27',
18580
- end: '35',
18581
- home: '36',
18582
- down: '40',
18583
- up: '38',
18584
- pageUp: '33',
18585
- pageDown: '34',
18586
- open: 'alt+40',
18587
- close: 'shift+tab',
18588
- hide: 'alt+38',
18589
- space: '32'
18590
- };
18591
18576
  };
18592
18577
  /**
18593
18578
  * Execute before render the list items
@@ -18633,9 +18618,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
18633
18618
  };
18634
18619
  Mention.prototype.bindCommonEvent = function () {
18635
18620
  if (!Browser.isDevice) {
18636
- this.keyboardModule = new KeyboardEvents(this.inputElement, {
18637
- keyAction: this.keyActionHandler.bind(this), keyConfigs: this.keyConfigure, eventName: 'keydown'
18638
- });
18621
+ this.inputElement.addEventListener('keydown', this.keyDownHandler.bind(this), true);
18639
18622
  }
18640
18623
  };
18641
18624
  /**
@@ -18687,6 +18670,47 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
18687
18670
  }
18688
18671
  }
18689
18672
  };
18673
+ Mention.prototype.keyDownHandler = function (e) {
18674
+ var isKeyAction = true;
18675
+ switch (e.keyCode) {
18676
+ case 38:
18677
+ e.action = e.altKey ? 'hide' : 'up';
18678
+ break;
18679
+ case 40:
18680
+ e.action = e.altKey ? 'open' : 'down';
18681
+ break;
18682
+ case 33:
18683
+ e.action = 'pageUp';
18684
+ break;
18685
+ case 34:
18686
+ e.action = 'pageDown';
18687
+ break;
18688
+ case 36:
18689
+ e.action = 'home';
18690
+ break;
18691
+ case 35:
18692
+ e.action = 'end';
18693
+ break;
18694
+ case 9:
18695
+ e.action = e.shiftKey ? 'close' : 'tab';
18696
+ break;
18697
+ case 27:
18698
+ e.action = 'escape';
18699
+ break;
18700
+ case 32:
18701
+ e.action = 'space';
18702
+ break;
18703
+ case 13:
18704
+ e.action = 'enter';
18705
+ break;
18706
+ default:
18707
+ isKeyAction = false;
18708
+ break;
18709
+ }
18710
+ if (isKeyAction) {
18711
+ this.keyActionHandler(e);
18712
+ }
18713
+ };
18690
18714
  Mention.prototype.keyActionHandler = function (e) {
18691
18715
  var isNavigation = (e.action === 'down' || e.action === 'up' || e.action === 'pageUp' || e.action === 'pageDown'
18692
18716
  || e.action === 'home' || e.action === 'end');
@@ -18765,7 +18789,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
18765
18789
  };
18766
18790
  Mention.prototype.unBindCommonEvent = function () {
18767
18791
  if (!Browser.isDevice) {
18768
- this.keyboardModule.destroy();
18792
+ this.inputElement.removeEventListener('keydown', this.keyDownHandler.bind(this), true);
18769
18793
  }
18770
18794
  };
18771
18795
  Mention.prototype.onKeyUp = function (e) {
@@ -19445,7 +19469,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
19445
19469
  * @returns {void}
19446
19470
  */
19447
19471
  Mention.prototype.wireListEvents = function () {
19448
- EventHandler.add(this.list, 'click', this.onMouseClick, this);
19472
+ EventHandler.add(this.list, 'mousedown', this.onMouseClick, this);
19449
19473
  EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
19450
19474
  EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
19451
19475
  };
@@ -19455,7 +19479,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
19455
19479
  * @returns {void}
19456
19480
  */
19457
19481
  Mention.prototype.unWireListEvents = function () {
19458
- EventHandler.remove(this.list, 'click', this.onMouseClick);
19482
+ EventHandler.remove(this.list, 'mousedown', this.onMouseClick);
19459
19483
  EventHandler.remove(this.list, 'mouseover', this.onMouseOver);
19460
19484
  EventHandler.remove(this.list, 'mouseout', this.onMouseLeave);
19461
19485
  };
@@ -19470,6 +19494,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
19470
19494
  var delay = 100;
19471
19495
  this.closePopup(delay, e);
19472
19496
  this.inputElement.focus();
19497
+ e.preventDefault();
19473
19498
  };
19474
19499
  Mention.prototype.updateSelectedItem = function (li, e, preventSelect, isSelection) {
19475
19500
  var _this = this;