Bug 149504
| Summary: | Caret missing from <input> after clearing text and calling select() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | ahmad.saleem792, ap, bburg, enrica, joepeck, rniwa |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Joseph Pecoraro
* SUMMARY
Caret missing from <input> after clearing text and calling select().
* TEST
<input id="x" type="search">
<button id="s">Select</button>
<script>
document.getElementById("s").addEventListener("click", function() {
var input = document.getElementById("x");
input.select();
});
</script>
* STEPS TO REPRODUCE
1. Load test page
2. Focus the <input>
3. Type "123"
4. Click the "Select" button
5. Hit Backspace/Delete to clear the text
6. Click the "Select" button
=> <input> is clearly focused, but there is no blinking caret. There should be.
* NOTES
- Firefox and Chrome behave as expected here
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
I changed the testcase to following JSFiddle:
Link - https://jsfiddle.net/76gpfk1s/show
I am able to see blinking I-Beam caret in Safari 16.
I am unable to reproduce this bug. Safari 16 matches "Chrome Canary 108" and "Firefox Nightly 107".
Marking this as "RESOLVED CONFIGURATION CHANGED". Thanks!