Side navigation
#15223 closed bug (migrated)
Opened August 31, 2014 01:12PM UTC
Closed October 21, 2014 12:59AM UTC
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
Attachments (0)
Change History (2)
Changed September 01, 2014 01:37AM UTC by comment:1
Changed October 21, 2014 12:59AM UTC by comment:2
resolution: | → migrated |
---|---|
status: | new → closed |
Migrated to https://github.com/jquery/jquery/issues/1792
Assume you focus the text field by mouse click, not by TAB key