replaced opera regex check with jquery browser check

This commit is contained in:
Peter 'Pita' Martischka 2013-02-10 21:21:22 +00:00
parent 500c451ba1
commit 1fbd408e82

View file

@ -4652,7 +4652,7 @@ function Ace2Inner(){
{ {
$(document).on("keydown", handleKeyEvent); $(document).on("keydown", handleKeyEvent);
// Hack for Opera to stop it firing twice on events // Hack for Opera to stop it firing twice on events
if (/Opera[\/\s](\d+\.\d+)/.test(!navigator.userAgent)){ if ($.browser.opera){
$(document).on("keypress", handleKeyEvent); $(document).on("keypress", handleKeyEvent);
} }
$(document).on("keyup", handleKeyEvent); $(document).on("keyup", handleKeyEvent);