From a45a8a837de85ba9c9e66af5a42d964ccf73ad52 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 9 Feb 2013 19:44:13 +0000 Subject: [PATCH] stop opera doing stupid things --- src/static/js/ace2_inner.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 50567965..eef7fbe4 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -4665,7 +4665,10 @@ function Ace2Inner(){ function bindTheEventHandlers() { $(document).on("keydown", handleKeyEvent); - $(document).on("keypress", handleKeyEvent); + // Hack for Opera to stop it firing twice on events + if (/Opera[\/\s](\d+\.\d+)/.test(!navigator.userAgent)){ + $(document).on("keypress", handleKeyEvent); + } $(document).on("keyup", handleKeyEvent); $(document).on("click", handleClick); $(root).on("blur", handleBlur);