From 4e3594d617ac122061b449a3f21d877c21d9bc56 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sat, 28 Dec 2013 17:59:45 +0000 Subject: [PATCH] Disable keyboard handler whilst workspace dialogs are open Fixes #128 --- public/red/ui/view.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/public/red/ui/view.js b/public/red/ui/view.js index 3be274dd4..e59b2ffc4 100644 --- a/public/red/ui/view.js +++ b/public/red/ui/view.js @@ -1124,7 +1124,13 @@ RED.view = function() { $( this ).dialog( "close" ); } } - ] + ], + open: function(e) { + RED.keyboard.disable(); + }, + close: function(e) { + RED.keyboard.enable(); + } }); $( "#node-dialog-delete-workspace" ).dialog({ modal: true, @@ -1152,7 +1158,14 @@ RED.view = function() { $( this ).dialog( "close" ); } } - ] + ], + open: function(e) { + RED.keyboard.disable(); + }, + close: function(e) { + RED.keyboard.enable(); + } + }); return {