@syncfusion/ej2-navigations 35.1.42 → 35.1.46
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.
- package/dist/ej2-navigations.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js +2 -2
- package/dist/ej2-navigations.umd.min.js.map +1 -1
- package/dist/es6/ej2-navigations.es2015.js +54 -14
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +55 -14
- package/dist/es6/ej2-navigations.es5.js.map +1 -1
- package/dist/global/ej2-navigations.min.js +2 -2
- package/dist/global/ej2-navigations.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +3 -3
- package/src/common/menu-base.d.ts +1 -0
- package/src/common/menu-base.js +8 -1
- package/src/toolbar/toolbar.d.ts +1 -0
- package/src/toolbar/toolbar.js +47 -13
|
@@ -1149,6 +1149,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1149
1149
|
this.navIdx = [];
|
|
1150
1150
|
this.animation = new Animation({});
|
|
1151
1151
|
this.isTapHold = false;
|
|
1152
|
+
this.isGeneratedElement = false;
|
|
1152
1153
|
this.tempItem = [];
|
|
1153
1154
|
this.showSubMenuOn = 'Auto';
|
|
1154
1155
|
this.isOpenCalled = false;
|
|
@@ -1194,6 +1195,7 @@ let MenuBase = class MenuBase extends Component {
|
|
|
1194
1195
|
let ele = this.element;
|
|
1195
1196
|
const ejInstance = getValue('ej2_instances', ele);
|
|
1196
1197
|
const ul = this.createElement('ul');
|
|
1198
|
+
this.isGeneratedElement = true;
|
|
1197
1199
|
const wrapper = this.createElement('EJS-MENU', { className: 'e-' + this.getModuleName() + '-wrapper' });
|
|
1198
1200
|
for (let idx = 0, len = ele.attributes.length; idx < len; idx++) {
|
|
1199
1201
|
ul.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);
|
|
@@ -3607,7 +3609,9 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3607
3609
|
this.element.innerHTML = '';
|
|
3608
3610
|
}
|
|
3609
3611
|
this.removeAttributes();
|
|
3610
|
-
wrapper.parentNode
|
|
3612
|
+
if (wrapper && wrapper.parentNode && !this.isGeneratedElement) {
|
|
3613
|
+
wrapper.parentNode.insertBefore(this.element, wrapper);
|
|
3614
|
+
}
|
|
3611
3615
|
this.clonedElement = null;
|
|
3612
3616
|
}
|
|
3613
3617
|
if (this.popupObj) {
|
|
@@ -3639,6 +3643,9 @@ let MenuBase = class MenuBase extends Component {
|
|
|
3639
3643
|
if (this.template) {
|
|
3640
3644
|
this.clearTemplate(['template']);
|
|
3641
3645
|
}
|
|
3646
|
+
if (this.element && !this.element.classList.length) {
|
|
3647
|
+
this.element.removeAttribute('class');
|
|
3648
|
+
}
|
|
3642
3649
|
}
|
|
3643
3650
|
this.rippleFn = null;
|
|
3644
3651
|
}
|
|
@@ -4115,10 +4122,15 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4115
4122
|
return;
|
|
4116
4123
|
}
|
|
4117
4124
|
if (rootEle === trgt) {
|
|
4118
|
-
this.
|
|
4125
|
+
if (this.isDropDownList(clst.firstElementChild)) {
|
|
4126
|
+
this.eleFocus(clst, 'next', true);
|
|
4127
|
+
}
|
|
4128
|
+
else {
|
|
4129
|
+
this.elementFocus(clst);
|
|
4130
|
+
}
|
|
4119
4131
|
}
|
|
4120
4132
|
else if (!navChk) {
|
|
4121
|
-
this.eleFocus(clst, 'next');
|
|
4133
|
+
this.eleFocus(clst, 'next', true);
|
|
4122
4134
|
}
|
|
4123
4135
|
break;
|
|
4124
4136
|
case 'moveLeft':
|
|
@@ -4126,7 +4138,7 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4126
4138
|
return;
|
|
4127
4139
|
}
|
|
4128
4140
|
if (!navChk) {
|
|
4129
|
-
this.eleFocus(clst, 'previous');
|
|
4141
|
+
this.eleFocus(clst, 'previous', true);
|
|
4130
4142
|
}
|
|
4131
4143
|
break;
|
|
4132
4144
|
case 'home':
|
|
@@ -4316,12 +4328,13 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4316
4328
|
}
|
|
4317
4329
|
return element;
|
|
4318
4330
|
}
|
|
4319
|
-
eleFocus(closest, pos) {
|
|
4331
|
+
eleFocus(closest, pos, skipDropDownList = false) {
|
|
4320
4332
|
const sib = Object(closest)[pos + 'ElementSibling'];
|
|
4321
4333
|
if (sib) {
|
|
4322
|
-
const skipEle = this.eleContains(sib)
|
|
4334
|
+
const skipEle = this.eleContains(sib) ||
|
|
4335
|
+
(skipDropDownList && this.isDropDownList(sib.firstElementChild));
|
|
4323
4336
|
if (skipEle) {
|
|
4324
|
-
this.eleFocus(sib, pos);
|
|
4337
|
+
this.eleFocus(sib, pos, skipDropDownList);
|
|
4325
4338
|
return;
|
|
4326
4339
|
}
|
|
4327
4340
|
this.elementFocus(sib);
|
|
@@ -4334,8 +4347,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4334
4347
|
if (!isNullOrUndefined(elem) && elem.children.length > 0) {
|
|
4335
4348
|
if (pos === 'next') {
|
|
4336
4349
|
const el = elem.querySelector('.' + CLS_ITEM);
|
|
4337
|
-
if (this.eleContains(el)) {
|
|
4338
|
-
this.eleFocus(el, pos);
|
|
4350
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4351
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4339
4352
|
}
|
|
4340
4353
|
else {
|
|
4341
4354
|
el.firstElementChild.focus();
|
|
@@ -4344,8 +4357,8 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4344
4357
|
}
|
|
4345
4358
|
else {
|
|
4346
4359
|
const el = elem.lastElementChild;
|
|
4347
|
-
if (this.eleContains(el)) {
|
|
4348
|
-
this.eleFocus(el, pos);
|
|
4360
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4361
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4349
4362
|
}
|
|
4350
4363
|
else {
|
|
4351
4364
|
this.elementFocus(el);
|
|
@@ -4356,10 +4369,24 @@ let Toolbar = class Toolbar extends Component {
|
|
|
4356
4369
|
else if (!isNullOrUndefined(closest)) {
|
|
4357
4370
|
const tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE$2 + ')' + ':not(.' + CLS_HIDDEN + ')');
|
|
4358
4371
|
if (pos === 'next' && tbrItems) {
|
|
4359
|
-
|
|
4372
|
+
let index = 0;
|
|
4373
|
+
while (skipDropDownList && index < tbrItems.length &&
|
|
4374
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4375
|
+
index++;
|
|
4376
|
+
}
|
|
4377
|
+
if (index < tbrItems.length) {
|
|
4378
|
+
this.elementFocus(tbrItems[index]);
|
|
4379
|
+
}
|
|
4360
4380
|
}
|
|
4361
4381
|
else if (pos === 'previous' && tbrItems) {
|
|
4362
|
-
|
|
4382
|
+
let index = tbrItems.length - 1;
|
|
4383
|
+
while (skipDropDownList && index >= 0 &&
|
|
4384
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4385
|
+
index--;
|
|
4386
|
+
}
|
|
4387
|
+
if (index >= 0) {
|
|
4388
|
+
this.elementFocus(tbrItems[index]);
|
|
4389
|
+
}
|
|
4363
4390
|
}
|
|
4364
4391
|
}
|
|
4365
4392
|
}
|
|
@@ -5690,7 +5717,9 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5690
5717
|
this.add(innerEle, CLS_TEMPLATE);
|
|
5691
5718
|
const firstChild = innerEle.firstElementChild;
|
|
5692
5719
|
if (!isNullOrUndefined(firstChild)) {
|
|
5693
|
-
|
|
5720
|
+
if (!this.isDropDownList(firstChild)) {
|
|
5721
|
+
firstChild.setAttribute('tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5722
|
+
}
|
|
5694
5723
|
firstChild.setAttribute('data-tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5695
5724
|
}
|
|
5696
5725
|
this.tbarEle.push(innerEle);
|
|
@@ -5808,6 +5837,17 @@ let Toolbar = class Toolbar extends Component {
|
|
|
5808
5837
|
getDataTabindex(ele) {
|
|
5809
5838
|
return isNullOrUndefined(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
|
|
5810
5839
|
}
|
|
5840
|
+
isDropDownList(ele) {
|
|
5841
|
+
if (isNullOrUndefined(ele)) {
|
|
5842
|
+
return false;
|
|
5843
|
+
}
|
|
5844
|
+
const input = ele.querySelector('input.e-control');
|
|
5845
|
+
if (isNullOrUndefined(input) || isNullOrUndefined(input.ej2_instances) || isNullOrUndefined(input.ej2_instances[0])) {
|
|
5846
|
+
return false;
|
|
5847
|
+
}
|
|
5848
|
+
const instance = input.ej2_instances[0];
|
|
5849
|
+
return instance.getModuleName() === 'dropdownlist';
|
|
5850
|
+
}
|
|
5811
5851
|
itemClick(e) {
|
|
5812
5852
|
this.activeEleSwitch(e.currentTarget);
|
|
5813
5853
|
}
|