-
-
Save iArnaud/4655752 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // From Lindsey Simon | |
| /** | |
| * This is a hack to make text input focus work in Android/PhoneGap | |
| * where calling el.focus() doesn't actually have the blinking cursor | |
| * effect = scumbag. | |
| * @param {Zepto} $el A zepto element. | |
| */ | |
| ws.focus = function($el) { | |
| var el = $el.get(0); | |
| el.focus(); | |
| el.setSelectionRange && el.setSelectionRange(0, 0); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment