Skip to content

Commit

Permalink
More fixes to ctrl-c behavior in HTML message display data
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Feb 5, 2015
1 parent 8d38f17 commit e961fa8
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions imp/js/base.js
Expand Up @@ -2576,19 +2576,28 @@ var ImpBase = {
return;
}

tmp = e;
e = new Event(e);
e.preventDefault();
noelt = true;
switch(kc) {
case 224://Firefox osx cmd
case 17://Opera osx cmd
case 91://Webkit left osx cmd
case 93://WebKit right osx cmd
case 17://CTRL
case 67://CTRL

switch (kc) {
case 17: // CTRL/Opera OSX Cmd
case 91: // WebKit left OSX Cmd
case 93: // WebKit right OSX Cmd
case 224: // Firefox OSX Cmd
break;

case 67:
if (tmp.metaKey || tmp.ctrlKey) {
// Allow copy text action inside HTML IFRAME.
break;
default:
$$('IFRAME').invoke('blur');
}
// Fall-through

default:
$$('IFRAME').invoke('blur');
break;
}
} else if (e.findElement('FORM')) {
// Inside form, so ignore.
Expand Down

0 comments on commit e961fa8

Please sign in to comment.