summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG2
-rw-r--r--program/js/list.js49
2 files changed, 12 insertions, 39 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 38882642b..c24cdfc59 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix keybord events on messages list in opera browser (#1488823)
+
RELEASE 0.8.4
-------------
- Fix XSS vulnerability in handling of text/enriched messages (#1488806)
diff --git a/program/js/list.js b/program/js/list.js
index 6ab6867e8..76ccaa535 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -90,10 +90,8 @@ init: function()
this.frame = this.list.parentNode;
// set body events
- if (this.keyboard) {
- rcube_event.add_listener({event:bw.opera?'keypress':'keydown', object:this, method:'key_press'});
- rcube_event.add_listener({event:'keydown', object:this, method:'key_down'});
- }
+ if (this.keyboard)
+ rcube_event.add_listener({event:'keydown', object:this, method:'key_press'});
}
},
@@ -996,49 +994,22 @@ key_press: function(e)
case 35: // End
this.select_last(mod_key);
return rcube_event.cancel(e);
- default:
- this.key_pressed = keyCode;
- this.modkey = mod_key;
- this.triggerEvent('keypress');
- this.modkey = 0;
-
- if (this.key_pressed == this.BACKSPACE_KEY)
- return rcube_event.cancel(e);
- }
-
- return true;
-},
-
-/**
- * Handler for keydown events
- */
-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 rcube_event.cancel(e);
+ default:
+ this.key_pressed = keyCode;
+ this.modkey = mod_key;
+ this.triggerEvent('keypress');
+ this.modkey = 0;
- case 40:
- case 38:
- case 63233:
- case 63232:
- case 61:
- case 107:
- case 109:
- case 32:
- if (!rcube_event.get_modifier(e) && this.focused)
+ if (this.key_pressed == this.BACKSPACE_KEY)
return rcube_event.cancel(e);
-
- default:
}
return true;