Bug 149504 - Caret missing from <input> after clearing text and calling select()
Summary: Caret missing from <input> after clearing text and calling select()
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-23 09:55 PDT by Joseph Pecoraro
Modified: 2022-10-16 03:15 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-09-23 09:55:12 PDT
* 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
Comment 1 Ahmad Saleem 2022-10-16 03:15:25 PDT
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!