@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.
@@ -18246,21 +18246,6 @@ let Mention = class Mention extends DropDownBase {
18246
18246
  this.isPopupOpen = false;
18247
18247
  this.isCollided = false;
18248
18248
  this.lineBreak = false;
18249
- this.keyConfigure = {
18250
- tab: 'tab',
18251
- enter: '13',
18252
- escape: '27',
18253
- end: '35',
18254
- home: '36',
18255
- down: '40',
18256
- up: '38',
18257
- pageUp: '33',
18258
- pageDown: '34',
18259
- open: 'alt+40',
18260
- close: 'shift+tab',
18261
- hide: 'alt+38',
18262
- space: '32'
18263
- };
18264
18249
  }
18265
18250
  /**
18266
18251
  * Execute before render the list items
@@ -18306,9 +18291,7 @@ let Mention = class Mention extends DropDownBase {
18306
18291
  }
18307
18292
  bindCommonEvent() {
18308
18293
  if (!Browser.isDevice) {
18309
- this.keyboardModule = new KeyboardEvents(this.inputElement, {
18310
- keyAction: this.keyActionHandler.bind(this), keyConfigs: this.keyConfigure, eventName: 'keydown'
18311
- });
18294
+ this.inputElement.addEventListener('keydown', this.keyDownHandler.bind(this), true);
18312
18295
  }
18313
18296
  }
18314
18297
  /**
@@ -18360,6 +18343,47 @@ let Mention = class Mention extends DropDownBase {
18360
18343
  }
18361
18344
  }
18362
18345
  }
18346
+ keyDownHandler(e) {
18347
+ let isKeyAction = true;
18348
+ switch (e.keyCode) {
18349
+ case 38:
18350
+ e.action = e.altKey ? 'hide' : 'up';
18351
+ break;
18352
+ case 40:
18353
+ e.action = e.altKey ? 'open' : 'down';
18354
+ break;
18355
+ case 33:
18356
+ e.action = 'pageUp';
18357
+ break;
18358
+ case 34:
18359
+ e.action = 'pageDown';
18360
+ break;
18361
+ case 36:
18362
+ e.action = 'home';
18363
+ break;
18364
+ case 35:
18365
+ e.action = 'end';
18366
+ break;
18367
+ case 9:
18368
+ e.action = e.shiftKey ? 'close' : 'tab';
18369
+ break;
18370
+ case 27:
18371
+ e.action = 'escape';
18372
+ break;
18373
+ case 32:
18374
+ e.action = 'space';
18375
+ break;
18376
+ case 13:
18377
+ e.action = 'enter';
18378
+ break;
18379
+ default:
18380
+ isKeyAction = false;
18381
+ break;
18382
+ }
18383
+ if (isKeyAction) {
18384
+ this.keyActionHandler(e);
18385
+ }
18386
+ }
18363
18387
  keyActionHandler(e) {
18364
18388
  const isNavigation = (e.action === 'down' || e.action === 'up' || e.action === 'pageUp' || e.action === 'pageDown'
18365
18389
  || e.action === 'home' || e.action === 'end');
@@ -18438,7 +18462,7 @@ let Mention = class Mention extends DropDownBase {
18438
18462
  }
18439
18463
  unBindCommonEvent() {
18440
18464
  if (!Browser.isDevice) {
18441
- this.keyboardModule.destroy();
18465
+ this.inputElement.removeEventListener('keydown', this.keyDownHandler.bind(this), true);
18442
18466
  }
18443
18467
  }
18444
18468
  onKeyUp(e) {
@@ -19113,7 +19137,7 @@ let Mention = class Mention extends DropDownBase {
19113
19137
  * @returns {void}
19114
19138
  */
19115
19139
  wireListEvents() {
19116
- EventHandler.add(this.list, 'click', this.onMouseClick, this);
19140
+ EventHandler.add(this.list, 'mousedown', this.onMouseClick, this);
19117
19141
  EventHandler.add(this.list, 'mouseover', this.onMouseOver, this);
19118
19142
  EventHandler.add(this.list, 'mouseout', this.onMouseLeave, this);
19119
19143
  }
@@ -19123,7 +19147,7 @@ let Mention = class Mention extends DropDownBase {
19123
19147
  * @returns {void}
19124
19148
  */
19125
19149
  unWireListEvents() {
19126
- EventHandler.remove(this.list, 'click', this.onMouseClick);
19150
+ EventHandler.remove(this.list, 'mousedown', this.onMouseClick);
19127
19151
  EventHandler.remove(this.list, 'mouseover', this.onMouseOver);
19128
19152
  EventHandler.remove(this.list, 'mouseout', this.onMouseLeave);
19129
19153
  }
@@ -19138,6 +19162,7 @@ let Mention = class Mention extends DropDownBase {
19138
19162
  const delay = 100;
19139
19163
  this.closePopup(delay, e);
19140
19164
  this.inputElement.focus();
19165
+ e.preventDefault();
19141
19166
  }
19142
19167
  updateSelectedItem(li, e, preventSelect, isSelection) {
19143
19168
  this.removeSelection();