Как вы знаете, в событии iOS «click» существует задержка в 300 мс, поэтому разработчики мобильных приложений используют разные библиотеки для достижения «косвенного» события без задержки (я использую tap.js). НО, когда вы нажимаете/нажимаете на элемент <input type="text" />
, до фокусировки до 300 мс задержка. Итак, кто-нибудь знает, как сделать ввод сосредоточенным на кране, а не на щелчке?iOS input focus on tap
0
A
ответ
0
Вы должны вручную отключить родной поведение и заставить это событие фокусировки
Пример:
$('input').on('touchstart', function(e){
e.preventDefault();
e.stopPropagation();
$(this).trigger('focus');
});
Вот и все.
Смежные вопросы
- 1. iOS tap to focus
- 2. Tap Highlight on iOS Safari
- 3. jquery focus и select on input: text
- 4. JQuery Fade Effect On Form Input Focus
- 5. IONIC Keyboard hide on input focus
- 6. jquery .next ('input'). Focus()
- 7. AngularJS Input Auto Focus
- 8. JQuery Input Focus Manipulation
- 9. jquery fancybox input focus
- 10. New Picture on Tap
- 11. MPMoviePlayerController Contols Glows On Tap IOS
- 12. Javascript: focus for Each Input
- 13. Ios safari black highlight focus on element
- 14. Dojo ValidationTextBoxes blur focus ... on focus
- 15. jquery focus on next input более чем одного типа
- 16. Angular/HTML5 Change Page State, Keep focus on input
- 17. UIImagePickerController custom overlay и tap-to-focus
- 18. vc mfc windows input focus
- 19. ContextMenu on tap вместо tap and hold
- 20. UIPickerView - Selection on Tap
- 21. Crash on focus UITextField
- 22. set focus() on textbox on form onload
- 23. Focus Traversable on CustomMenuItem. Content free focus on mouse hover
- 24. Удалить: focus on: active
- 25. focus on UITextField
- 26. Append ul on focus
- 27. Открыть select2 on focus
- 28. Imagemagic focus on area
- 29. KendoUI combobox on focus
- 30. Удалить blankText on focus