From 41c7c4e16c92c98c8b95796146e229574db4c53c Mon Sep 17 00:00:00 2001 From: thomasb Date: Fri, 5 Sep 2008 10:32:25 +0000 Subject: Capture backspace key in list mode (#1484566) git-svn-id: https://svn.roundcube.net/trunk@1742 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/js/app.js | 2 ++ roundcubemail/program/js/list.js | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'roundcubemail/program') diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 9a9865db4..e533e7bde 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -1283,6 +1283,8 @@ function rcube_webmail() this.command('show'); else if (list.key_pressed == list.DELETE_KEY) this.command('delete'); + else if (list.key_pressed == list.BACKSPACE_KEY) + this.command('delete'); else list.shiftkey = false; }; diff --git a/roundcubemail/program/js/list.js b/roundcubemail/program/js/list.js index 97549f7eb..f33c67c7b 100644 --- a/roundcubemail/program/js/list.js +++ b/roundcubemail/program/js/list.js @@ -26,6 +26,7 @@ function rcube_list_widget(list, p) // static contants this.ENTER_KEY = 13; this.DELETE_KEY = 46; + this.BACKSPACE_KEY = 8; this.list = list ? list : null; this.frame = null; @@ -574,6 +575,9 @@ key_press: function(e) this.shiftkey = e.shiftKey; this.key_pressed = keyCode; this.trigger_event('keypress'); + + if (this.key_pressed == list.BACKSPACE_KEY) + return rcube_event.cancel(e); } return true; -- cgit v1.2.3