Opened 11 years ago
Closed 11 years ago
#12973 closed bug (notabug)
IE8: Selected elements may be lost when calling .text('string')
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In IE8, the value of: $('<span class="value">').text('text!').length
is 0
In other browsers, $('<span class="value">').text('text!').length
is 1
It works correctly if you do not specify a class, e.g. $('<span>').text('text!').length
is 1 in all browsers
Change History (3)
comment:1 Changed 11 years ago by
Owner: | set to bguertin@… |
---|---|
Status: | new → pending |
comment:2 Changed 11 years ago by
Status: | pending → new |
---|
Whoops. You can close this bug. It is fixed in edge, but broken in the stable release. My bad
comment:3 Changed 11 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
Close your span like the docs say to do.
Note: See
TracTickets for help on using
tickets.
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to begin.