[refactor] improve menu scroll

This commit is contained in:
Kuldeep M 2019-07-17 00:11:30 +01:00
parent cec0947fa7
commit 648e4f9978
3 changed files with 8 additions and 3 deletions

View File

@ -63,7 +63,8 @@ var menu = (function() {
var html = helper.e("html"); var html = helper.e("html");
if (state.get().menu) { if (state.get().menu) {
helper.addClass(html, "is-menu-open"); helper.addClass(html, "is-menu-open");
helper.e(".menu").focus(); render.focus();
render.scrollToTop();
shade.render({ shade.render({
action: function() { action: function() {
mod.close(); mod.close();
@ -95,6 +96,10 @@ var menu = (function() {
} }
}; };
render.focus = function() {
helper.e(".menu").focus();
};
var toggle = function() { var toggle = function() {
mod.toggle(); mod.toggle();
render.toggle(); render.toggle();

View File

@ -1,6 +1,6 @@
var version = (function() { var version = (function() {
var current = "3.48.0"; var current = "3.49.0";
var compare = function(a, b) { var compare = function(a, b) {
var pa = a.split("."); var pa = a.split(".");

View File

@ -2,7 +2,7 @@
"name": "nightTab", "name": "nightTab",
"short_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.", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"version": "3.48.0", "version": "3.49.0",
"manifest_version": 2, "manifest_version": 2,
"chrome_url_overrides": { "chrome_url_overrides": {
"newtab": "index.html" "newtab": "index.html"