mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-11-27 02:24:22 +01:00
[bug] prevent modal close fireing more than once when a modal is already open
This commit is contained in:
parent
df4ce23486
commit
93b9009fa3
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nightTab",
|
||||
"version": "5.27.0",
|
||||
"version": "5.27.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nightTab",
|
||||
"version": "5.27.0",
|
||||
"version": "5.27.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": {
|
||||
|
@ -56,24 +56,18 @@ var keyboard = (function() {
|
||||
if (state.get.current().menu) {
|
||||
menu.close();
|
||||
};
|
||||
if (state.get.current().modal && !state.get.current().link.add) {
|
||||
modal.close();
|
||||
};
|
||||
if (state.get.current().link.edit) {
|
||||
link.edit.item.close();
|
||||
modal.close();
|
||||
shade.close();
|
||||
data.save();
|
||||
};
|
||||
if (state.get.current().group.edit) {
|
||||
link.edit.group.close();
|
||||
modal.close();
|
||||
shade.close();
|
||||
data.save();
|
||||
};
|
||||
if (state.get.current().group.add) {
|
||||
link.add.group.close();
|
||||
modal.close();
|
||||
shade.close();
|
||||
data.save();
|
||||
};
|
||||
@ -91,24 +85,18 @@ var keyboard = (function() {
|
||||
if (state.get.current().menu) {
|
||||
menu.close();
|
||||
};
|
||||
if (state.get.current().modal && !state.get.current().group.add) {
|
||||
modal.close();
|
||||
};
|
||||
if (state.get.current().link.edit) {
|
||||
link.edit.item.close();
|
||||
modal.close();
|
||||
shade.close();
|
||||
data.save();
|
||||
};
|
||||
if (state.get.current().link.add) {
|
||||
link.add.item.close();
|
||||
modal.close();
|
||||
shade.close();
|
||||
data.save();
|
||||
};
|
||||
if (state.get.current().group.edit) {
|
||||
link.edit.group.close();
|
||||
modal.close();
|
||||
shade.close();
|
||||
data.save();
|
||||
};
|
||||
|
@ -64,6 +64,7 @@ var modal = (function() {
|
||||
allModal[i].close();
|
||||
};
|
||||
};
|
||||
_previousModal = null;
|
||||
};
|
||||
|
||||
render.open = function(override) {
|
||||
@ -80,7 +81,6 @@ var modal = (function() {
|
||||
options = helper.applyOptions(options, override);
|
||||
};
|
||||
var _makeModal = function() {
|
||||
mod.open();
|
||||
var body = helper.e("body");
|
||||
var modal = helper.node("div");
|
||||
var modalWrapper = helper.node("div|class:modal-wrapper");
|
||||
@ -88,7 +88,7 @@ var modal = (function() {
|
||||
modal.setAttribute("class", "modal modal-large");
|
||||
} else if (options.size == "small") {
|
||||
modal.setAttribute("class", "modal modal-small");
|
||||
} else if (options.size) {
|
||||
} else {
|
||||
modal.setAttribute("class", "modal");
|
||||
};
|
||||
modal.close = function() {
|
||||
@ -98,7 +98,6 @@ var modal = (function() {
|
||||
} else {
|
||||
modal.remove();
|
||||
};
|
||||
mod.close();
|
||||
bind.focus.remove();
|
||||
};
|
||||
var modalBody = helper.node("div|class:modal-body");
|
||||
@ -139,7 +138,7 @@ var modal = (function() {
|
||||
if (options.cancelAction) {
|
||||
options.cancelAction();
|
||||
};
|
||||
this.close();
|
||||
close();
|
||||
}.bind(modal), false);
|
||||
_previousModal = modal;
|
||||
body.appendChild(modal);
|
||||
|
@ -1,6 +1,6 @@
|
||||
var version = (function() {
|
||||
|
||||
var current = "5.27.0";
|
||||
var current = "5.27.1";
|
||||
|
||||
var name = "Zonked Tarsier";
|
||||
|
||||
|
@ -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.27.0",
|
||||
"version": "5.27.1",
|
||||
"manifest_version": 2,
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
|
Loading…
Reference in New Issue
Block a user