From: Alexander Ebert Date: Sun, 6 Dec 2015 14:06:58 +0000 (+0100) Subject: Using a more robust work-around for focus() on iOS X-Git-Tag: 2.1.9~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=de3110b2286f1136e73b8d552616578f57442110;p=GitHub%2FWoltLab%2FWCF.git Using a more robust work-around for focus() on iOS --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index e06760b6f8..e5f0cd8d68 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -184,8 +184,8 @@ window.shuffle = function(array) { // work-around for zoom bug on iOS when using .focus() if (jQuery.browser.iOS) { - jQuery.fn.focus = function() { - return this; + jQuery.fn.focus = function(data, fn) { + return arguments.length > 0 ? this.on('focus', null, data, fn) : this.trigger('focus'); }; } })(jQuery);