Opened 9 years ago
Closed 9 years ago
#15223 closed bug (migrated)
Cannot select the text in input field under IE11 using jquery onfocus event
Reported by: | brianpow | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | event | Version: | 1.11.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Background
I plan to select the whole text inside an input field if user focus on the field.
Enivronment
IE11 under Win 7 64 bits
FF31 under Win7 64 bits
Method
$(function(){ jQuery(document).on('focus',XXX) }); function XXX{ this.select(); }
Result
IE11: jQuery.on does NOT work. The text is not selected. But if I use addEventListener instead, it works well.
FF31: Both jQuery.on or addEventListener work
Test Case
Change History (2)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Resolution: | → migrated |
---|---|
Status: | new → closed |
Migrated to https://github.com/jquery/jquery/issues/1792
Note: See
TracTickets for help on using
tickets.
Assume you focus the text field by mouse click, not by TAB key