Skip to content

Commit

Permalink
[bug] fix saved custom theme controls tab index when not in edit mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieFox committed Apr 22, 2020
1 parent 2db6d22 commit eafd4c2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nightTab",
"version": "5.21.0",
"version": "5.21.1",
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"main": "index.js",
"scripts": {
Expand Down
11 changes: 11 additions & 0 deletions src/js/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var control = (function() {
type: "button",
func: function() {
menu.open();
theme.render.custom.tabIndex();
},
}, {
element: ".control-add-link",
Expand Down Expand Up @@ -183,60 +184,70 @@ var control = (function() {
type: "button",
func: function() {
menu.nav("layout");
theme.render.custom.tabIndex();
}
}, {
element: ".control-menu-header",
type: "button",
func: function() {
menu.nav("header");
theme.render.custom.tabIndex();
}
}, {
element: ".control-menu-groups",
type: "button",
func: function() {
menu.nav("groups");
theme.render.custom.tabIndex();
}
}, {
element: ".control-menu-bookmarks",
type: "button",
func: function() {
menu.nav("bookmarks");
theme.render.custom.tabIndex();
}
}, {
element: ".control-menu-theme",
type: "button",
func: function() {
menu.nav("theme");
theme.render.custom.tabIndex();
}
}, {
element: ".control-menu-background",
type: "button",
func: function() {
menu.nav("background");
theme.render.custom.tabIndex();
}
}, {
element: ".control-menu-data",
type: "button",
func: function() {
menu.nav("data");
theme.render.custom.tabIndex();
}
}, {
element: ".control-menu-coffee",
type: "button",
func: function() {
menu.nav("coffee");
theme.render.custom.tabIndex();
}
}, {
element: ".control-menu-nighttab",
type: "button",
func: function() {
menu.nav("nighttab");
theme.render.custom.tabIndex();
}
}, {
element: ".control-menu-close",
type: "button",
func: function() {
menu.close();
theme.render.custom.tabIndex();
}
}]
},
Expand Down
6 changes: 3 additions & 3 deletions src/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -2275,9 +2275,9 @@ var theme = (function() {
var themeCustomButton = helper.node("button|class:theme-custom-button button button-block button-ring,tabindex:-1");
var themeCustomPreview = helper.node("span|class:theme-custom-preview");
var themeCustomControl = helper.node("div|class:theme-custom-control");
var themeCustomEdit = helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-2");
var themeCustomEdit = helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-1");
var themeCustomEditIcon = helper.node("spa|class:button-icon icon-edit");
var themeCustomRemove = helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-2");
var themeCustomRemove = helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-1");
var themeCustomRemoveIcon = helper.node("spa|class:button-icon icon-close");
var shadeSteps = 4;
var rgb = arrayItem.color.rgb;
Expand Down Expand Up @@ -2578,7 +2578,7 @@ var theme = (function() {
});
} else {
helper.eA(".theme-custom-control-item").forEach(function(arrayItem, index) {
arrayItem.tabIndex = -2;
arrayItem.tabIndex = -1;
});
};
},
Expand Down
2 changes: 1 addition & 1 deletion src/js/version.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var version = (function() {

var current = "5.21.0";
var current = "5.21.1";

var name = "Zonked Tarsier";

Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nightTab",
"short_name": "nightTab",
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"version": "5.21.0",
"version": "5.21.1",
"manifest_version": 2,
"chrome_url_overrides": {
"newtab": "index.html"
Expand Down

0 comments on commit eafd4c2

Please sign in to comment.