Open
Bug 1323744
Opened 8 years ago
Updated 2 months ago
The setSelectionRange method called on focus event does not work every even try
Categories
(Core :: DOM: Selection, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: rmrfhome, Unassigned)
Details
(Keywords: testcase)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Steps to reproduce:
The makup: <input type="text" value="some_text" onfocus="this.setSelectionRange(0, this.value.length)" />
1) click to the input
2) click outside the input to unfocus
3) goto step (1)
Actual results:
every odd try after step (1) all text in the input will be selected
every even try after step (1) text will not be selected
Expected results:
every try after step (1) all the text should be selected
Updated•2 years ago
|
Severity: normal → S3
Comment 1•2 years ago
|
||
I have this bug with Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0 (it works correctly with Chromium 113).
The problem only occurs when you click on text that was previously selected.
Case that works
- Click on
bar
in the input. - Click outside the input to unfocus.
- Goto step (1).
Every try after step (1): foo
is selected.
Case that doesn't work
- Click on
foo
in the input. - Click outside the input to unfocus.
- Goto step (1).
Every odd try after step (1): foo
is selected.
Every even try after step (1): foo
isn't selected.
You need to log in
before you can comment on or make changes to this bug.
Description
•