@syncfusion/ej2-navigations 28.1.39 → 28.2.3

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.
@@ -1347,6 +1347,9 @@ let MenuBase = class MenuBase extends Component {
1347
1347
  }
1348
1348
  domKeyHandler(e) {
1349
1349
  if (e.keyCode === 27) {
1350
+ if (this.isMenuVisible()) {
1351
+ e.stopImmediatePropagation();
1352
+ }
1350
1353
  e.action = ESCAPE;
1351
1354
  this.leftEscKeyHandler(e);
1352
1355
  }
@@ -2264,7 +2267,12 @@ let MenuBase = class MenuBase extends Component {
2264
2267
  args.curData[args.fields[fields.id]] = getUniqueID('menuitem');
2265
2268
  }
2266
2269
  if (isNullOrUndefined(args.curData.htmlAttributes)) {
2267
- args.curData.htmlAttributes = {};
2270
+ Object.defineProperty(args.curData, 'htmlAttributes', {
2271
+ value: {},
2272
+ writable: true,
2273
+ enumerable: true,
2274
+ configurable: true
2275
+ });
2268
2276
  }
2269
2277
  if (Browser.isIE) {
2270
2278
  if (!args.curData.htmlAttributes.role) {
@@ -11479,11 +11487,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
11479
11487
  if (!isNullOrUndefined(firstUl)) {
11480
11488
  firstUl.setAttribute('role', treeAriaAttr.treeRole);
11481
11489
  this.setMultiSelect(this.allowMultiSelection);
11482
- const firstNode = select('.' + LISTITEM, this.element);
11483
- if (firstNode) {
11484
- firstNode.setAttribute('tabindex', '0');
11485
- this.updateIdAttr(null, firstNode);
11486
- }
11490
+ this.setNodeFocusable();
11487
11491
  if (this.allowTextWrap) {
11488
11492
  this.updateWrap();
11489
11493
  }
@@ -15137,6 +15141,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
15137
15141
  }
15138
15142
  this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
15139
15143
  }
15144
+ this.setNodeFocusable();
15140
15145
  this.updateCheckedStateFromDS();
15141
15146
  if (this.showCheckBox && dropLi) {
15142
15147
  this.ensureParentCheckState(dropLi);
@@ -15533,6 +15538,13 @@ let TreeView = TreeView_1 = class TreeView extends Component {
15533
15538
  this.doCheckBoxAction(nodes, false);
15534
15539
  }
15535
15540
  }
15541
+ setNodeFocusable() {
15542
+ const firstNode = select('.' + LISTITEM, this.element);
15543
+ if (firstNode) {
15544
+ firstNode.setAttribute('tabindex', '0');
15545
+ this.updateIdAttr(null, firstNode);
15546
+ }
15547
+ }
15536
15548
  };
15537
15549
  __decorate$8([
15538
15550
  Property(false)