From: Alexander Ebert Date: Thu, 27 Aug 2015 14:16:05 +0000 (+0200) Subject: Disable focus() on iOS X-Git-Tag: 2.1.7~19^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c05492aa419ff255e85eaabea329a2dcb1ebe908;p=GitHub%2FWoltLab%2FWCF.git Disable focus() on iOS --- 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