Bug Tracker

Opened 9 years ago

Closed 9 years ago

#12973 closed bug (notabug)

IE8: Selected elements may be lost when calling .text('string')

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:


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 9 years ago by Rick Waldron

Owner: set to [email protected]
Status: newpending

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.

comment:2 Changed 9 years ago by [email protected]

Status: pendingnew

Whoops. You can close this bug. It is fixed in edge, but broken in the stable release. My bad


comment:3 Changed 9 years ago by dmethvin

Resolution: notabug
Status: newclosed

Close your span like the docs say to do.

Note: See TracTickets for help on using tickets.