javascript-tutorial / javascript-tutorial/en.javascript.info

Text selection is reset after pressing a button in iOS/iPadOS

オープン
#3,087 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
HTML
スター
25.5k
フォーク
4k
PR マージ指標
30日以内にマージされた PR はありません

説明

Problem
The Selection and Range article includes a demo button that should show an alert with the selected text. On desktop environments or non-Apple mobile devices, the demo works correctly. The alert shows the current selected text, while the selection itself is also maintained.

However on iOS/iPadOS devices(iPhone, iPad, ...) the text selection disappears as soon as you press the button and the alert appears with empty text.

I believe this is an issue with iOS/iPadOS Safari, rather than a bug in javascript.info but nevertheless I wonder if anyone could share some insight on why this isn't working as expected. I've tried my best but up to this point could not find any similar troubleshooting anywhere else.

https://user-images.githubusercontent.com/34783801/176479597-5d7d5621-a513-497a-a114-3cd4b2c055f8.MP4

.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Selection and Range の記事とそのデモボタンから始め、提供された例を使って iOS/iPadOS Safari での動作を再現します。選択されたテキストと alert の動作を、デスクトップ環境および Apple 以外のモバイル環境と比較します。Safari の制限なのかデモの問題なのかを明らかにし、証拠またはサポートされている workaround を記録できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
html, javascript
領域
documentation
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。