Ticket #10127 (closed bug: worksforme)
text() returns value with a space on the end of <li>s in ie7 - ie8+, ff, chrom, opera all do not.
| Reported by: | callumrogers@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | manipulation | Version: | 1.6.2 |
| Keywords: | ie6 ie7 ie8 | Cc: | |
| Blocking: | Blocked by: |
Description
Spent an hour or so debugging some code which uses the .text() function on li's - take a look at the console output of this in ie7 vs different browsers: http://jsfiddle.net/gAGjk/3/
innerText is also returning the same thing, so I assume it's an ie7 DOM or js bug; either way, it would be nice for jQuery to realise this and present a consistent cross-browser behaviour.
Change History
comment:1 Changed 21 months ago by timmywil
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to manipulation
- Milestone changed from None to 1.next
comment:2 Changed 11 months ago by dmethvin
- Keywords ie6 ie7 ie8 added
- Status changed from open to closed
- Resolution set to worksforme
I can't repro this on IE8 with any version, they all show length of 26 chars. However, if there was a trailing space it would be in line with the documentation that indicates browsers deal with whitespace differently.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

http://jsfiddle.net/timmywil/gAGjk/4/ Confirmed