Bug 215736

Summary: iOS safari cannot input text by Japanese keyboard to <input> after clear value
Product: WebKit Reporter: fellows3
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, cdumez, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: iPhone / iPad   
OS: iOS 13   
Attachments:
Description Flags
Repro case by fellows3
none
Repro case by fellows3 none

Description fellows3 2020-08-21 10:37:38 PDT
Same post: https://stackoverflow.com/questions/63527069/ios-safari-input-typing-issue-when-clear-value#comment112334984_63527069

Type some text and tap the custom clear button, and then programmatically return focus to the input, I won't be able to continue typing. The caret is blinking, but I can't input anything when I type on the soft keyboard. This happens on a Japanese keyboard and cannot be reproduced on an English keyboard.

demo: https://codepen.io/fellows3/pen/vYGyjjV
Comment 1 Radar WebKit Bug Importer 2020-08-21 10:38:33 PDT
<rdar://problem/67565658>
Comment 2 fellows3 2020-08-21 10:57:25 PDT
More reduced test case: https://codepen.io/fellows3/pen/WNwoygO
Comment 3 Wenson Hsieh 2020-08-21 11:09:39 PDT
Created attachment 407018 [details]
Repro case by fellows3

(In reply to fellows3 from comment #2)
> More reduced test case: https://codepen.io/fellows3/pen/WNwoygO

Thank you for the test case!

I am able to reproduce the bug with IME on iOS 14 beta (testing with both Japanese Kana keyboard and Chinese Pinyin). It looks like WebCore::Editor's composition state is out of sync with system keyboard state, which seems to cause problems.
Comment 4 Wenson Hsieh 2020-08-21 11:11:38 PDT
Created attachment 407019 [details]
Repro case by fellows3