モバイルsafariだとinputのtextにフォーカス時に全体が選択状態にならないので、setSelectionRangeを使うとよい。

miya-janmiya-jan のブックマーク 2013/11/08 20:03

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

Programmatically selecting text in an input field on iOS devices (mobile Safari)

    How do you programmatically select the text of an input field on iOS devices, e.g. iPhone, iPad running mobile Safari? Normally it is sufficient to call the .select() function on the <input ... /> ...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう