Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 8 years ago

#201 closed bug (invalid)

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

Reported by: brandon.aaron@… Owned by:
Priority: undecided Milestone:
Component: ajax Version:
Keywords: "" Cc: ""
Blocked by: Blocking:

Description

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 brandon.aaron@… 14 years ago.
The diff.

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by brandon.aaron@…

Attachment: dimensions.diff added

The diff.

comment:1 Changed 14 years ago by joern

Resolution: fixed
Status: newclosed

Fixed in SVN.

comment:2 Changed 14 years ago by anonymous

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

SPAMPOLICE

Note: See TracTickets for help on using tickets.