Bug 210166 - Selection.getRangeAt(0) unexpectedly throw IndexSizeError even when node is removed during composition
Summary: Selection.getRangeAt(0) unexpectedly throw IndexSizeError even when node is r...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Safari 13
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: CanvaBug, InRadar
Depends on:
Blocks:
 
Reported: 2020-04-07 16:55 PDT by Xidorn Quan
Modified: 2022-08-15 05:51 PDT (History)
4 users (show)

See Also:


Attachments
testcase (1.05 KB, text/html)
2020-04-07 16:55 PDT, Xidorn Quan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xidorn Quan 2020-04-07 16:55:10 PDT
Created attachment 395760 [details]
testcase

Steps to reproduce:
1. open the attached testcase on Safari on iOS
2. tap on the box (and see the soft keyboard to show up)
3. switch to Japanese keyboard
4. input several characters from the keyboard without picking anything on the word selection bar
5. click "Done" button on top of the soft keyboard

At that point, you should see the text box removed from the page.

Expected result:
The selection info text should say there is no selection (indicating selection.rangeCount is zero).

Actual result:
The selection info text says IndexSizeError (indicating selection.rangeCount is one but getRangeAt(0) throws).
Comment 1 Radar WebKit Bug Importer 2020-04-08 17:00:30 PDT
<rdar://problem/61485999>