jQuery: The Write Less, Do More JavaScript Library

Ticket #201 (closed bug: invalid)

Opened 2 years ago

Last modified 1 year ago

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

Reported by: brandon.aaron@… Assigned to: anonymous
Type: bug Priority: blocker
Milestone: Component: ajax
Version: Keywords: ""
Cc: "" Needs:

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

Change History

Changed 2 years ago by joern

  • status changed from new to closed
  • resolution set to fixed

Fixed in SVN.

Changed 2 years ago by anonymous

  • priority set to blocker
  • status changed from reopened to closed
  • component set to ajax
  • resolution set to invalid
  • type set to bug

SPAMPOLICE

Note: See TracTickets for help on using tickets.