mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-19 22:17:59 +01:00
Fix "Edit Element Style", "New Attribute", etc. in Firebug.
This commit is contained in:
@@ -1013,7 +1013,7 @@ var Events = Module("events", {
|
||||
|
||||
DOMMenuBarInactive: function () {
|
||||
this._activeMenubar = false;
|
||||
modes.remove(modes.MENU);
|
||||
modes.remove(modes.MENU, true);
|
||||
},
|
||||
|
||||
blur: function onBlur(event) {
|
||||
@@ -1244,7 +1244,7 @@ var Events = Module("events", {
|
||||
popuphidden: function onPopupHidden() {
|
||||
// gContextMenu is set to NULL, when a context menu is closed
|
||||
if (window.gContextMenu == null && !this._activeMenubar)
|
||||
modes.remove(modes.MENU);
|
||||
modes.remove(modes.MENU, true);
|
||||
},
|
||||
|
||||
resize: function onResize(event) {
|
||||
|
||||
@@ -155,7 +155,15 @@ var Modes = Module("modes", {
|
||||
this.addMode("MENU", {
|
||||
description: "Active when a menu or other pop-up is open",
|
||||
input: true,
|
||||
passthrough: true
|
||||
passthrough: true,
|
||||
ownsInput: false
|
||||
}, {
|
||||
leave: function leave(stack) {
|
||||
util.timeout(function () {
|
||||
if (stack.pop && !modes.main.input && !Events.isInputElement(dactyl.focusedElement));
|
||||
modes.push(modes.INSERT);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.addMode("LINE", {
|
||||
@@ -260,8 +268,13 @@ var Modes = Module("modes", {
|
||||
commandline.widgets.mode = msg || null;
|
||||
},
|
||||
|
||||
remove: function remove(mode) {
|
||||
if (this.stack.some(function (m) m.main == mode)) {
|
||||
remove: function remove(mode, covert) {
|
||||
if (covert && this.topOfStack.main != mode) {
|
||||
util.assert(mode != this.NORMAL);
|
||||
for (let m; m = array.nth(this.modeStack, function (m) m.main == mode, 0);)
|
||||
this._modeStack.splice(this._modeStack.indexOf(m));
|
||||
}
|
||||
else if (this.stack.some(function (m) m.main == mode)) {
|
||||
this.pop(mode);
|
||||
this.pop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user