Slightly delay focus to work-around some browser issues
authorAlexander Ebert <ebert@woltlab.com>
Sun, 16 Oct 2016 17:37:55 +0000 (19:37 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 16 Oct 2016 17:38:00 +0000 (19:38 +0200)
wcfsetup/install/files/js/WCF.ColorPicker.js

index 1776f80fd8197b60e43b6adcfcd448be172f0b93..5b0b0c94c16c7388bfebaabbd386f29d15057f87 100644 (file)
@@ -143,7 +143,9 @@ WCF.ColorPicker = Class.extend({
                });
                
                // set default focus
-               this._hex.focus();
+               window.setTimeout((function () {
+                       this._hex.focus();
+               }).bind(this), 200);
        },
        
        /**