Bug Tracker

Modify

Ticket #12283 (closed bug: fixed)

Opened 21 months ago

Last modified 20 months ago

jQuery 1.8 outerHeight is returning undefined instead of null

Reported by: PDSBGreg Owned by: mikesherov
Priority: blocker Milestone: 1.8.1
Component: dimensions Version: 1.8.0
Keywords: Cc:
Blocking: Blocked by:

Description

Moving from jQuery 1.7.2 to 1.8 has changed the return value for outerHeight. In 1.7.2, the outerHeight of an element that does not exist on a page returns null. As of 1.8, it returns undefined. So, equations that used to work in 1.7.2 now return NaN.

Here's a jsFiddle with 1.8 selected.  http://jsfiddle.net/4eUJC/1/ Switch the jQuery version to 1.7.2 to see the previously expected (working) results.

Change History

comment:1 Changed 21 months ago by timmywil

  • Priority changed from undecided to blocker
  • Status changed from new to open
  • Component changed from unfiled to dimensions
  • Milestone changed from None to 1.8.1

Yes, we should be returning null in these cases.

comment:2 Changed 21 months ago by mikesherov

  • Owner set to mikesherov
  • Status changed from open to assigned

comment:4 Changed 20 months ago by Mike Sherov

  • Status changed from assigned to closed
  • Resolution set to fixed

Fix #12283. Return null for dimension getters on non elements. Fix gh-900.

Changeset: ad040181dc6c05fa37941a6c9bfbe98bdf7ba8f1

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.