Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14456 closed bug (notabug)

.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.

Change History (5)

comment:1 Changed 6 years ago by timmywil

#14457 is a duplicate of this ticket.

comment:2 Changed 6 years ago by timmywil

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.

comment:3 Changed 6 years ago by gibson042

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

comment:5 in reply to:  4 Changed 6 years ago by warlock

Replying to 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.

Note: See TracTickets for help on using tickets.