diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-04-16 10:50:06 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-04-16 10:50:06 +0200 |
commit | 398b7a9b0b63b1df91fceffccf7724fa98cade5e (patch) | |
tree | 3d479cfc40badcc8f35256da1b0c771e4e08399d /program | |
parent | a2e09c950d8716346b151f7980df1b51ebfbdd78 (diff) |
Use (deprecated) event.returnValue on legacy browsers only
Diffstat (limited to 'program')
-rw-r--r-- | program/js/common.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/program/js/common.js b/program/js/common.js index ed9488b2c..7bb76c763 100644 --- a/program/js/common.js +++ b/program/js/common.js @@ -255,13 +255,17 @@ remove_listener: function(p) cancel: function(evt) { var e = evt ? evt : window.event; + if (e.preventDefault) e.preventDefault(); + else + e.returnValue = false; + if (e.stopPropagation) e.stopPropagation(); e.cancelBubble = true; - e.returnValue = false; + return false; }, |