Bug 34374 - Caret disappears after deleting the final character and inserting text during the fired input event
Summary: Caret disappears after deleting the final character and inserting text during...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-30 02:51 PST by Steven Brown
Modified: 2011-07-04 12:45 PDT (History)
3 users (show)

See Also:


Attachments
Test Case (Disappearing caret) (141 bytes, text/html)
2010-01-30 02:51 PST, Steven Brown
no flags Details
Workaround (Disappearing Caret) (170 bytes, text/html)
2010-01-30 02:54 PST, Steven Brown
no flags Details
Example of caret disappearing (274 bytes, text/html)
2010-07-19 20:43 PDT, Morris
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Brown 2010-01-30 02:51:22 PST
Created attachment 47762 [details]
Test Case (Disappearing caret)

To reproduce:
- Open the attached test case.
- Backspace over the 'b' character.
- Backspace over the 'a' character (the final character remaining in the text field).
- The caret has now disappeared, although the text field is still highlighted as though it were focused.

Have reproduced this issue in:
- Safari 4.0.4 (531.21.10)
- Google Chrome 4.0.249.78

Expected behaviour:
After backspacing over the character in the text field, the caret should appear at the end of the text. This is the behaviour of Mozilla Firefox 3.5.7 and Opera 10.10.
Comment 1 Steven Brown 2010-01-30 02:54:47 PST
Created attachment 47763 [details]
Workaround (Disappearing Caret)

Attached a workaround. When deleting the final character of the text field, the caret does not disappear.
Comment 2 Morris 2010-07-19 20:43:57 PDT
Created attachment 62030 [details]
Example of caret disappearing

Setting input.value to '' during the oninput event causes the caret to disappear. 

To repeat, open file webkit_caret_bug.html, focus to the first input box and press a key, and caret is lost.
Comment 3 Steven Brown 2011-07-04 06:41:11 PDT
Both attached test cases work (the caret does not disappear) in Google Chrome 12.0.742.112. Resolved as fixed.
Comment 4 Alexey Proskuryakov 2011-07-04 12:45:10 PDT
Works in WebKit nightly r89812, too.