diff options
author | thomascube <thomas@roundcube.net> | 2011-09-22 20:51:42 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-09-22 20:51:42 +0000 |
commit | ebee2ab26ed69cb2fabd1b68828ae52c3783319d (patch) | |
tree | 502a78e04b98dbc210e6ef07620d33f8c468de0b | |
parent | 487173ed086d2dd7b21a2f3f51f675a53ce1cacf (diff) |
Ignore events from form elements
-rw-r--r-- | program/js/list.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/program/js/list.js b/program/js/list.js index f0e1c9bc1..0d124ac7c 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -954,7 +954,8 @@ highlight_row: function(id, multiple) */ key_press: function(e) { - if (this.focused != true) + var target = e.target || {}; + if (this.focused != true || target.nodeName == 'INPUT' || target.nodeName == 'TEXTAREA' || target.nodeName == 'SELECT') return true; var keyCode = rcube_event.get_keycode(e), @@ -1004,13 +1005,17 @@ key_press: function(e) */ key_down: function(e) { + var target = e.target || {}; + if (this.focused != true || target.nodeName == 'INPUT' || target.nodeName == 'TEXTAREA' || target.nodeName == 'SELECT') + return true; + switch (rcube_event.get_keycode(e)) { case 27: if (this.drag_active) - return this.drag_mouse_up(e); + return this.drag_mouse_up(e); if (this.col_drag_active) { this.selected_column = null; - return this.column_drag_mouse_up(e); + return this.column_drag_mouse_up(e); } case 40: |