@syncfusion/ej2-navigations 35.1.42 → 35.1.43
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 +46 -13
- package/dist/es6/ej2-navigations.es2015.js.map +1 -1
- package/dist/es6/ej2-navigations.es5.js +47 -13
- 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/toolbar/toolbar.d.ts +1 -0
- package/src/toolbar/toolbar.js +47 -13
|
@@ -4256,10 +4256,15 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4256
4256
|
return;
|
|
4257
4257
|
}
|
|
4258
4258
|
if (rootEle === trgt) {
|
|
4259
|
-
this.
|
|
4259
|
+
if (this.isDropDownList(clst.firstElementChild)) {
|
|
4260
|
+
this.eleFocus(clst, 'next', true);
|
|
4261
|
+
}
|
|
4262
|
+
else {
|
|
4263
|
+
this.elementFocus(clst);
|
|
4264
|
+
}
|
|
4260
4265
|
}
|
|
4261
4266
|
else if (!navChk) {
|
|
4262
|
-
this.eleFocus(clst, 'next');
|
|
4267
|
+
this.eleFocus(clst, 'next', true);
|
|
4263
4268
|
}
|
|
4264
4269
|
break;
|
|
4265
4270
|
case 'moveLeft':
|
|
@@ -4267,7 +4272,7 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4267
4272
|
return;
|
|
4268
4273
|
}
|
|
4269
4274
|
if (!navChk) {
|
|
4270
|
-
this.eleFocus(clst, 'previous');
|
|
4275
|
+
this.eleFocus(clst, 'previous', true);
|
|
4271
4276
|
}
|
|
4272
4277
|
break;
|
|
4273
4278
|
case 'home':
|
|
@@ -4458,12 +4463,14 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4458
4463
|
}
|
|
4459
4464
|
return element;
|
|
4460
4465
|
};
|
|
4461
|
-
Toolbar.prototype.eleFocus = function (closest, pos) {
|
|
4466
|
+
Toolbar.prototype.eleFocus = function (closest, pos, skipDropDownList) {
|
|
4467
|
+
if (skipDropDownList === void 0) { skipDropDownList = false; }
|
|
4462
4468
|
var sib = Object(closest)[pos + 'ElementSibling'];
|
|
4463
4469
|
if (sib) {
|
|
4464
|
-
var skipEle = this.eleContains(sib)
|
|
4470
|
+
var skipEle = this.eleContains(sib) ||
|
|
4471
|
+
(skipDropDownList && this.isDropDownList(sib.firstElementChild));
|
|
4465
4472
|
if (skipEle) {
|
|
4466
|
-
this.eleFocus(sib, pos);
|
|
4473
|
+
this.eleFocus(sib, pos, skipDropDownList);
|
|
4467
4474
|
return;
|
|
4468
4475
|
}
|
|
4469
4476
|
this.elementFocus(sib);
|
|
@@ -4476,8 +4483,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4476
4483
|
if (!isNullOrUndefined(elem) && elem.children.length > 0) {
|
|
4477
4484
|
if (pos === 'next') {
|
|
4478
4485
|
var el = elem.querySelector('.' + CLS_ITEM);
|
|
4479
|
-
if (this.eleContains(el)) {
|
|
4480
|
-
this.eleFocus(el, pos);
|
|
4486
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4487
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4481
4488
|
}
|
|
4482
4489
|
else {
|
|
4483
4490
|
el.firstElementChild.focus();
|
|
@@ -4486,8 +4493,8 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4486
4493
|
}
|
|
4487
4494
|
else {
|
|
4488
4495
|
var el = elem.lastElementChild;
|
|
4489
|
-
if (this.eleContains(el)) {
|
|
4490
|
-
this.eleFocus(el, pos);
|
|
4496
|
+
if (this.eleContains(el) || (skipDropDownList && this.isDropDownList(el.firstElementChild))) {
|
|
4497
|
+
this.eleFocus(el, pos, skipDropDownList);
|
|
4491
4498
|
}
|
|
4492
4499
|
else {
|
|
4493
4500
|
this.elementFocus(el);
|
|
@@ -4498,10 +4505,24 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
4498
4505
|
else if (!isNullOrUndefined(closest)) {
|
|
4499
4506
|
var tbrItems = this.element.querySelectorAll('.' + CLS_ITEMS + ' .' + CLS_ITEM + ':not(.' + CLS_SEPARATOR + ')' + ':not(.' + CLS_DISABLE$2 + ')' + ':not(.' + CLS_HIDDEN + ')');
|
|
4500
4507
|
if (pos === 'next' && tbrItems) {
|
|
4501
|
-
|
|
4508
|
+
var index = 0;
|
|
4509
|
+
while (skipDropDownList && index < tbrItems.length &&
|
|
4510
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4511
|
+
index++;
|
|
4512
|
+
}
|
|
4513
|
+
if (index < tbrItems.length) {
|
|
4514
|
+
this.elementFocus(tbrItems[index]);
|
|
4515
|
+
}
|
|
4502
4516
|
}
|
|
4503
4517
|
else if (pos === 'previous' && tbrItems) {
|
|
4504
|
-
|
|
4518
|
+
var index = tbrItems.length - 1;
|
|
4519
|
+
while (skipDropDownList && index >= 0 &&
|
|
4520
|
+
this.isDropDownList(tbrItems[index].firstElementChild)) {
|
|
4521
|
+
index--;
|
|
4522
|
+
}
|
|
4523
|
+
if (index >= 0) {
|
|
4524
|
+
this.elementFocus(tbrItems[index]);
|
|
4525
|
+
}
|
|
4505
4526
|
}
|
|
4506
4527
|
}
|
|
4507
4528
|
};
|
|
@@ -5848,7 +5869,9 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5848
5869
|
this.add(innerEle, CLS_TEMPLATE);
|
|
5849
5870
|
var firstChild = innerEle.firstElementChild;
|
|
5850
5871
|
if (!isNullOrUndefined(firstChild)) {
|
|
5851
|
-
|
|
5872
|
+
if (!this.isDropDownList(firstChild)) {
|
|
5873
|
+
firstChild.setAttribute('tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5874
|
+
}
|
|
5852
5875
|
firstChild.setAttribute('data-tabindex', isNullOrUndefined(firstChild.getAttribute('tabIndex')) ? '-1' : this.getDataTabindex(firstChild));
|
|
5853
5876
|
}
|
|
5854
5877
|
this.tbarEle.push(innerEle);
|
|
@@ -5966,6 +5989,17 @@ var Toolbar = /** @__PURE__ @class */ (function (_super) {
|
|
|
5966
5989
|
Toolbar.prototype.getDataTabindex = function (ele) {
|
|
5967
5990
|
return isNullOrUndefined(ele.getAttribute('data-tabindex')) ? '-1' : ele.getAttribute('data-tabindex');
|
|
5968
5991
|
};
|
|
5992
|
+
Toolbar.prototype.isDropDownList = function (ele) {
|
|
5993
|
+
if (isNullOrUndefined(ele)) {
|
|
5994
|
+
return false;
|
|
5995
|
+
}
|
|
5996
|
+
var input = ele.querySelector('input.e-control');
|
|
5997
|
+
if (isNullOrUndefined(input) || isNullOrUndefined(input.ej2_instances) || isNullOrUndefined(input.ej2_instances[0])) {
|
|
5998
|
+
return false;
|
|
5999
|
+
}
|
|
6000
|
+
var instance = input.ej2_instances[0];
|
|
6001
|
+
return instance.getModuleName() === 'dropdownlist';
|
|
6002
|
+
};
|
|
5969
6003
|
Toolbar.prototype.itemClick = function (e) {
|
|
5970
6004
|
this.activeEleSwitch(e.currentTarget);
|
|
5971
6005
|
};
|