Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 11 years ago

#201 closed bug (invalid)

[PATCH] innerWidth and innerHeight fails in IE with no borders

Reported by: [email protected] Owned by:
Priority: undecided Milestone:
Component: ajax Version:
Keywords: "" Cc: ""
Blocked by: Blocking:


If an element does not have a border the innerWidth and innerHeight functions of the dimensions plugin cause a NaN result. It is a very simple fix. Just need to add || 0 to each of the parseInt calls on line 81 and 99.

Line 81:

this.get(0).offsetHeight - parseInt(this.css("borderTop")) - parseInt(this.css("borderBottom"));

Should now be

this.get(0).offsetHeight - parseInt(this.css("borderTop") || 0) - parseInt(this.css("borderBottom") || 0);

Line 99:

this.get(0).offsetWidth - parseInt(this.css("borderLeft")) - parseInt(this.css("borderRight"));

Should now be

this.get(0).offsetWidth - parseInt(this.css("borderLeft") || 0) - parseInt(this.css("borderRight") || 0);

Attachments (1)

dimensions.diff (1.1 KB) - added by [email protected] 16 years ago.
The diff.

Download all attachments as: .zip

Change History (4)

Changed 16 years ago by [email protected]

Attachment: dimensions.diff added

The diff.

comment:1 Changed 16 years ago by joern

Resolution: fixed
Status: newclosed

Fixed in SVN.

comment:2 Changed 16 years ago by anonymous

Component: ajax
Priority: blocker
Resolution: invalid
Status: reopenedclosed
Type: bug


Note: See TracTickets for help on using tickets.