Ticket #9787 (closed bug: invalid)
Two IE bugs
| Reported by: | beth.marston@… | Owned by: | beth.marston@… |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | effects | Version: | 1.6.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
In IE 7 and 8 and possibly 6, there are two bugs with jquery-1.6.2. The first is a parse error -- a try block without a catch block -- and the second involves a DOM CSS property getting 'px' tacked on its end, despite the fact that IE (idiosyncratically) has already attached 'px' once. This throws an uncaught exception.
The attached diff fixes both problems.
(I know this bug report is incomplete, but I'm working to deadline right now, sorry.)
< } ---
} catch (e) { /* do nothing */ }
8537,8538c8537,8550 < if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
| fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit; |
---
if ( fx.elem.style && fx.elem.style[ fx.prop ] !== null ) {
if ( fx.prop === "width" fx.prop === "height") { var m = Math.max(0, fx.now); fx.elem.style[ fx.prop ] = m;
} else {
fx.elem.style[ fx.prop ] = 0;
} fx.elem.style[ fx.prop ] = String(fx.elem.style[ fx.prop ]);
necessary for many browsers, but will fail on (at least) IE 7 & 8, because fx.elem.style[fx.prop] has already had 'px' tacked on its butt try {
fx.elem.style[ fx.prop ] = fx.elem.style[ fx.prop ] + fx.unit;
} catch (e) { /* do nothing, but with panache */ }
Change History
comment:1 Changed 23 months ago by timmywil
- Owner set to beth.marston@…
- Priority changed from undecided to low
- Status changed from new to pending
- Component changed from unfiled to effects
comment:2 Changed 22 months ago by trac-o-bot
- Status changed from pending to closed
- Resolution set to invalid
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:3 Changed 22 months ago by sbagnak
Code with error: http://jsfiddle.net/psv4R/
Code without error: http://jsfiddle.net/7sgKD/
Changed: percents to pixels
with error:
.animate({"width": percentage + "%"});
without error:
.animate({"width": Math.ceil(percentage/100*$('.passwordStrengthBar').width()) + px"});
Error present in 1.5.2 and 1.6.2 too.
Hmmm... I can't reopen this ticket. Should I create a new one ?
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project! The first problem has been reported and is #9033, but still needs a working test case posted there if someone can create one. For the second, please provide a reduced test case on http://jsfiddle.net that reproduces the issue experienced to help us assess the issue.
Additionally, test against the jQuery (edge) version to ensure the issue still exists.