Skip to main content

Bug Tracker

Side navigation

#14456 closed bug (notabug)

Opened October 16, 2013 03:43PM UTC

Closed October 16, 2013 04:00PM UTC

Last modified October 16, 2013 06:06PM UTC

.text() problem with IE 11 Release Preview

Reported by: warlock Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:
Description

I've been working on my site and encountered an error when using the .text() function. An example of the problem can be seen here:

http://jsfiddle.net/VBQx4/

In Chrome 30 and Firefox 24, the .text() function when called against an <li> node, returns the expected output "car" or "truck" respectively. However, in IE 11 Release Preview, .text() is returning the bullet from the <li> node in the list in front of the text like so "*car" "*truck" (the asterisk represents the bullet). That's as close as I could come to demonstrating the error that occurs. The alert box in the example above, when run in IE 11 Release Preview, clearly shows the bullet returned in the .text() function. I noticed this error because the text is used as a property of an object (or key in an associative array, whichever you prefer). With the "*" (bullet), the key is not found and an error is throw in my code.

I'm not sure the desired output of the .text(). Maybe the bullet should be returned, maybe it shouldn't. However, I figure the output of the function should be consistent.

I went back and tested in IE 9 and IE 10 and the function works as desired, returning only "car" or "truck" respectively without the bullet.

Attachments (0)
Change History (5)

Changed October 16, 2013 03:51PM UTC by timmywil comment:1

#14457 is a duplicate of this ticket.

Changed October 16, 2013 04:00PM UTC by timmywil comment:2

resolution: → notabug
status: newclosed

Thank you for contributing! However, we do not yet support IE11. If this is still a problem when IE11 is stable, we can review.

Changed October 16, 2013 04:16PM UTC by gibson042 comment:3

Looks like IE11 has changed the behavior of .textContent in violation of both the spec and good sense: http://jsfiddle.net/VBQx4/3/

Changed October 16, 2013 04:42PM UTC by gibson042 comment:4

Changed October 16, 2013 06:06PM UTC by warlock comment:5

Replying to [comment:4 gibson042]:

Reported to Microsoft: https://connect.microsoft.com/IE/feedback/details/805580/incorrect-textcontent-for-li-elements

I appreciate your help with this matter. I wasn't sure where to take it from here. Thanks for pointing me in the right direction. I'll be sure to keep a watch on that issue and hope it gets resolved.