diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-10-14 12:11:09 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-10-14 12:11:09 +0200 |
commit | 075574c81f6d8c1db3c2f2dba1a3f084fcb810d8 (patch) | |
tree | 0cf718d5a1ad70c438c6fda38ae1982f1685b0f2 /program/js | |
parent | ddeed163c0ee8fa205e4a2fd87b61a80504f7ed9 (diff) |
Use onclick even for status, flag and expando actions to fix issue
where mouse right click would invoke action where it shouldn't
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/app.js | 6 | ||||
-rw-r--r-- | program/js/list.js | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js index 5ea01e750..7fbab8003 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1713,7 +1713,7 @@ function rcube_webmail() // set eventhandler to status icon if (row.icon = document.getElementById(status_icon)) { row.icon._row = row.obj; - row.icon.onmousedown = function(e) { self.command('toggle_status', this); rcube_event.cancel(e); }; + row.icon.onclick = function(e) { self.command('toggle_status', this); return rcube_event.cancel(e); }; } // save message icon position too @@ -1725,12 +1725,12 @@ function rcube_webmail() // set eventhandler to flag icon, if icon found if (this.env.flagged_col != null && (row.flagicon = document.getElementById('flagicn'+row.uid))) { row.flagicon._row = row.obj; - row.flagicon.onmousedown = function(e) { self.command('toggle_flag', this); rcube_event.cancel(e); }; + row.flagicon.onclick = function(e) { self.command('toggle_flag', this); return rcube_event.cancel(e); }; } if (!row.depth && row.has_children && (expando = document.getElementById('rcmexpando'+row.uid))) { row.expando = expando; - expando.onmousedown = function(e) { return self.expand_message_row(e, uid); }; + expando.onclick = function(e) { return self.expand_message_row(e, uid); }; if (bw.touch) { expando.addEventListener('touchend', function(e) { if (e.changedTouches.length == 1) { diff --git a/program/js/list.js b/program/js/list.js index 0f8d56c19..f05ac1aaa 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -409,7 +409,7 @@ drag_row: function(e, id) var evtarget = rcube_event.get_target(e), tagname = evtarget.tagName.toLowerCase(); - if (this.dont_select || (evtarget && (tagname == 'input' || tagname == 'img'))) + if (this.dont_select || (evtarget && (tagname == 'input' || tagname == 'img' || evtarget.onclick))) return true; // accept right-clicks |