Created
May 14, 2013 10:47
-
-
Save iguu/5575105 to your computer and use it in GitHub Desktop.
Chrome Firefoxでfocus出来ないと思ったら setTimeoutが居るらしい、理屈がよくわからん。
クリックイベントの最中にfocus()を他に移すのがNGなんだろうか
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//クリックイベントの中で | |
if(target.find("input").size()>=1){ | |
setTimeout(function(){ | |
//webkit,geckoにはfocus()にsetTimeoutが必要 | |
target.find("input").focus();//入力欄にフォーカス | |
},0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment