javascript-tutorial / javascript-tutorial/en.javascript.info
Text selection is reset after pressing a button in iOS/iPadOS
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 25.5k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
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.
.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Selection and Range article and its demo button, then reproduce the behavior on iOS/iPadOS Safari using the supplied example. Compare the selected text and alert behavior with desktop and non-Apple mobile environments; done means establishing whether this is a Safari limitation or an issue in the demo and recording the evidence or a supported workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100