javascript-tutorial / javascript-tutorial/en.javascript.info
Text selection is reset after pressing a button in iOS/iPadOS
還沒有人認領這個 Issue。
- 主要語言
- 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.
.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Selection and Range 文章及其示範按鈕開始,然後使用提供的範例在 iOS/iPadOS Safari 上重現該行為。將選取的文字和 alert 行為與桌面環境及非 Apple 行動環境進行比較;完成的標準是確定這是 Safari 的限制還是 demo 中的問題,並記錄證據或受支援的 workaround。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- html, javascript
- 領域
- documentation
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100