Skip to content

Commit c24dc96

Browse files
author
Christian Krebs
committed
DFL-3539 Using any Console shortcut while the Console is disabled throws
1 parent c31f95f commit c24dc96

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/ui-scripts/actions/actionbroker.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,12 +361,8 @@ var ActionBroker = function()
361361
var shared_shortcuts = this._current_shared_shortcuts[this._action_context.mode] || {};
362362
var action = shortcuts[key_id] || shared_shortcuts[key_id] || '';
363363
var propagate_event = true;
364-
if (action)
365-
{
366-
propagate_event = this._action_context.handle(action,
367-
event,
368-
this._container);
369-
}
364+
if (action && this._action_context.is_enabled)
365+
propagate_event = this._action_context.handle(action, event, this._container);
370366

371367
if (!(propagate_event === false) &&
372368
this._action_context != this._global_handler)

src/ui-scripts/actions/actionhandlerinterface.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
return actions;
5353
};
5454

55+
this.is_enabled = true;
56+
5557
this.mode = "default";
5658

5759
this._handlers = {};

src/ui-scripts/actions/globalactionhandler.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*/
77
this.id = id;
88

9+
this.is_enabled = true;
10+
911
/**
1012
* To handle a single action.
1113
* Returning false (as in === false) will cancel the event

0 commit comments

Comments
 (0)