Skip to content

Commit 0e703df

Browse files
committed
[bug] fix modal not closing when opening menu by keyboard shortcut
1 parent ac8b56c commit 0e703df

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
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": "4.8.0",
3+
"version": "4.8.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/keyboard.js‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,26 @@ var keyboard = (function(){
101101
window.addEventListener("keydown",function(event){
102102
// ctrl+alt+m
103103
if(event.ctrlKey&&event.altKey&&event.keyCode==77){
104-
if(state.get.current().link.add){
104+
if(state.get.current().link.edit){
105+
link.edit.item.close();
106+
modal.close();
107+
shade.close();
108+
data.save();
109+
}elseif(state.get.current().link.add){
105110
link.add.item.close();
111+
modal.close();
112+
shade.close();
113+
data.save();
114+
}elseif(state.get.current().group.edit){
115+
link.edit.group.close();
116+
modal.close();
117+
shade.close();
118+
data.save();
119+
}elseif(state.get.current().group.add){
106120
link.add.group.close();
121+
modal.close();
122+
shade.close();
123+
data.save();
107124
}elseif(state.get.current().modal){
108125
modal.close();
109126
shade.close();

‎src/js/version.js‎

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

3-
varcurrent="4.8.0";
3+
varcurrent="4.8.1";
44

55
varname="Naughty Goose";
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": "4.8.0",
5+
"version": "4.8.1",
66
"manifest_version": 2,
77
"chrome_url_overrides":{
88
"newtab": "index.html"

0 commit comments

Comments
(0)