Skip to main content

Bug Tracker

Side navigation

#4571 closed bug (worksforme)

Opened April 22, 2009 08:05AM UTC

Closed June 12, 2010 06:27PM UTC

IE throws error when trying to set negative value to CSS padding property

Reported by: gal_ga Owned by:
Priority: major Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: css,negative Cc:
Blocked by: Blocking:
Description

When trying to modify a paddingTop (also padding or padding-top) with a negative value I get JavaScript error in Internet Explorer 7 (also IE 6).

example in the attached file.

Attachments (1)
  • ie_err.html (0.7 KB) - added by gal_ga April 22, 2009 08:05AM UTC.

    IE throws error when trying to set negative value to CSS padding property

Change History (1)

Changed June 12, 2010 06:27PM UTC by dmethvin comment:1

description: \ When trying to modify a paddingTop (also padding or padding-top) with a negative value I get JavaScript error in Internet Explorer 7 (also IE 6). \ \ example in the attached file.When trying to modify a paddingTop (also padding or padding-top) with a negative value I get JavaScript error in Internet Explorer 7 (also IE 6). \ \ example in the attached file.
resolution: → worksforme
status: newclosed

Padding can't be negative, so the input to jQuery isn't correct. How would this be resolved? Putting a try/catch around this just masks the problem. The current behavior seems correct, I'd actually prefer that Firefox threw errors on invalid input too so that people wouldn't be sloppy.