[refactor] link tab index

This commit is contained in:
Kuldeep M 2019-06-04 19:34:17 +01:00
parent b6700fd250
commit 5b8fda836d
2 changed files with 9 additions and 7 deletions

View File

@ -1809,10 +1809,10 @@ var control = (function() {
var _edit = function() { var _edit = function() {
if (state.get().link.edit) { if (state.get().link.edit) {
helper.addClass(html, "is-link-edit"); helper.addClass(html, "is-link-edit");
link.tabIndex(); link.render.tabIndex();
} else { } else {
helper.removeClass(html, "is-link-edit"); helper.removeClass(html, "is-link-edit");
link.tabIndex(); link.render.tabIndex();
}; };
}; };
var _date = function() { var _date = function() {

View File

@ -61,7 +61,7 @@ var link = (function() {
data.save(); data.save();
clear(); clear();
render.link(); render.link();
tabIndex(); render.tabIndex();
control.dependents(); control.dependents();
control.render(); control.render();
resetStagedBookmarkData(); resetStagedBookmarkData();
@ -114,7 +114,7 @@ var link = (function() {
data.save(); data.save();
clear(); clear();
render.link(); render.link();
tabIndex(); render.tabIndex();
_returnToPreviousFocusLink(); _returnToPreviousFocusLink();
resetStagedBookmarkData(); resetStagedBookmarkData();
}, },
@ -514,6 +514,9 @@ var link = (function() {
link: function() { link: function() {
_link(); _link();
}, },
tabIndex: function() {
_tabIndex();
},
items: function() { items: function() {
_items(); _items();
} }
@ -592,7 +595,7 @@ var link = (function() {
html.style.setProperty("--link-items-width", state.get().link.items.width + "%"); html.style.setProperty("--link-items-width", state.get().link.items.width + "%");
}; };
var tabIndex = function() { var _tabIndex = function() {
var allLinkControlItem = helper.eA(".link-control-item"); var allLinkControlItem = helper.eA(".link-control-item");
if (state.get().link.edit) { if (state.get().link.edit) {
allLinkControlItem.forEach(function(arrayItem, index) { allLinkControlItem.forEach(function(arrayItem, index) {
@ -628,8 +631,7 @@ var link = (function() {
add: add, add: add,
edit: edit, edit: edit,
remove: remove, remove: remove,
render: render, render: render
tabIndex: tabIndex
}; };
})(); })();