Open Bug 1323744 Opened 4 years ago Updated 4 years ago

The setSelectionRange method called on focus event does not work every even try

Categories

(Core :: DOM: Selection, defect)

50 Branch
defect
Not set
normal

Tracking

()

UNCONFIRMED

People

(Reporter: rmrfhome, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

Attached file page to reproduce
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
Component: Untriaged → Selection
Keywords: testcase
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.