diff options
Diffstat (limited to 'web/share/js/wm.js')
-rw-r--r-- | web/share/js/wm.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/share/js/wm.js b/web/share/js/wm.js index 697f4755..9369d0c0 100644 --- a/web/share/js/wm.js +++ b/web/share/js/wm.js @@ -156,8 +156,8 @@ function __WindowManager() { return promise; }; - self.switchDisabled = function(el, disabled) { - if (disabled && document.activeElement === el) { + self.switchEnabled = function(el, enabled) { + if (!enabled && document.activeElement === el) { let el_to_focus = ( el.closest(".modal-window") || el.closest(".window") @@ -167,7 +167,7 @@ function __WindowManager() { el_to_focus.focus(); } } - el.disabled = disabled; + el.disabled = !enabled; }; self.showWindow = function(el_window, activate=true, center=false) { |