Skip to content

Commit eafd4c2

Browse files
committed
[bug] fix saved custom theme controls tab index when not in edit mode
1 parent 2db6d22 commit eafd4c2

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nightTab",
3-
"version": "5.21.0",
3+
"version": "5.21.1",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
55
"main": "index.js",
66
"scripts": {

src/js/control.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var control = (function() {
1818
type: "button",
1919
func: function() {
2020
menu.open();
21+
theme.render.custom.tabIndex();
2122
},
2223
}, {
2324
element: ".control-add-link",
@@ -183,60 +184,70 @@ var control = (function() {
183184
type: "button",
184185
func: function() {
185186
menu.nav("layout");
187+
theme.render.custom.tabIndex();
186188
}
187189
}, {
188190
element: ".control-menu-header",
189191
type: "button",
190192
func: function() {
191193
menu.nav("header");
194+
theme.render.custom.tabIndex();
192195
}
193196
}, {
194197
element: ".control-menu-groups",
195198
type: "button",
196199
func: function() {
197200
menu.nav("groups");
201+
theme.render.custom.tabIndex();
198202
}
199203
}, {
200204
element: ".control-menu-bookmarks",
201205
type: "button",
202206
func: function() {
203207
menu.nav("bookmarks");
208+
theme.render.custom.tabIndex();
204209
}
205210
}, {
206211
element: ".control-menu-theme",
207212
type: "button",
208213
func: function() {
209214
menu.nav("theme");
215+
theme.render.custom.tabIndex();
210216
}
211217
}, {
212218
element: ".control-menu-background",
213219
type: "button",
214220
func: function() {
215221
menu.nav("background");
222+
theme.render.custom.tabIndex();
216223
}
217224
}, {
218225
element: ".control-menu-data",
219226
type: "button",
220227
func: function() {
221228
menu.nav("data");
229+
theme.render.custom.tabIndex();
222230
}
223231
}, {
224232
element: ".control-menu-coffee",
225233
type: "button",
226234
func: function() {
227235
menu.nav("coffee");
236+
theme.render.custom.tabIndex();
228237
}
229238
}, {
230239
element: ".control-menu-nighttab",
231240
type: "button",
232241
func: function() {
233242
menu.nav("nighttab");
243+
theme.render.custom.tabIndex();
234244
}
235245
}, {
236246
element: ".control-menu-close",
237247
type: "button",
238248
func: function() {
239249
menu.close();
250+
theme.render.custom.tabIndex();
240251
}
241252
}]
242253
},

src/js/theme.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,9 +2275,9 @@ var theme = (function() {
22752275
var themeCustomButton = helper.node("button|class:theme-custom-button button button-block button-ring,tabindex:-1");
22762276
var themeCustomPreview = helper.node("span|class:theme-custom-preview");
22772277
var themeCustomControl = helper.node("div|class:theme-custom-control");
2278-
var themeCustomEdit = helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-2");
2278+
var themeCustomEdit = helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-1");
22792279
var themeCustomEditIcon = helper.node("spa|class:button-icon icon-edit");
2280-
var themeCustomRemove = helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-2");
2280+
var themeCustomRemove = helper.node("button|class:theme-custom-control-item theme-custom-control-item-remove button button-small,tabindex:-1");
22812281
var themeCustomRemoveIcon = helper.node("spa|class:button-icon icon-close");
22822282
var shadeSteps = 4;
22832283
var rgb = arrayItem.color.rgb;
@@ -2578,7 +2578,7 @@ var theme = (function() {
25782578
});
25792579
} else {
25802580
helper.eA(".theme-custom-control-item").forEach(function(arrayItem, index) {
2581-
arrayItem.tabIndex = -2;
2581+
arrayItem.tabIndex = -1;
25822582
});
25832583
};
25842584
},

src/js/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var version = (function() {
22

3-
var current = "5.21.0";
3+
var current = "5.21.1";
44

55
var name = "Zonked Tarsier";
66

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nightTab",
33
"short_name": "nightTab",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
5-
"version": "5.21.0",
5+
"version": "5.21.1",
66
"manifest_version": 2,
77
"chrome_url_overrides": {
88
"newtab": "index.html"

0 commit comments

Comments
 (0)