Bug 235223
| Summary: | REGRESSION(iOS 15): getSelection() is successful rarely, on onclick event | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Takao Baba <baba> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | megan_gardner, rniwa, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 15 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 15 | ||
Takao Baba
# Steps to reproduce:
1. Open https://jsbin.com/pubipidaxu/edit?html,js,output by Safari on iOS 15.
2. Long-press "Hello". Make sure the text is selected.
3. Touch "click" button.
# Expected behavior:
Alert with text "Hello" is shown. (I'm not care whether the selection remains or not.)
# Actual behaviro:
In most cases, alert with no text is shown. Sometimes works correctly.
# Note
On iOS 14, getSelection() can always get the text. The selection seems remain though it become invisible at the click.
Other browsers such as Android Chrome and desktop browsers do not have this issue: the selection remains after the click.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/87873363>
Ryosuke Niwa
This seems to work on iOS 16.4.