From c05492aa419ff255e85eaabea329a2dcb1ebe908 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 27 Aug 2015 16:16:05 +0200 Subject: [PATCH] Disable focus() on iOS --- wcfsetup/install/files/js/WCF.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 5784331371..9e866b7f84 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -124,7 +124,7 @@ window.shuffle = function(array) { /** * User-Agent based browser detection and touch detection. */ -(function() { +(function(jQuery) { var ua = navigator.userAgent.toLowerCase(); var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || /(webkit)[ \/]([\w.]+)/.exec( ua ) || @@ -181,7 +181,14 @@ window.shuffle = function(array) { // Redactor support jQuery.browser.redactor = true; -})(); + + // work-around for zoom bug on iOS when using .focus() + if (jQuery.browser.iOS) { + jQuery.fn.focus = function() { + return arguments[0]; + }; + } +})(jQuery); /** * Initialize WCF namespace -- 2.20.1