Skip to main content

Bug Tracker

Side navigation

#8797 closed bug (invalid)

Opened April 07, 2011 08:59AM UTC

Closed April 16, 2011 08:16PM UTC

jQuery innerWidth() throws ownerDocument is null

Reported by: Justin Nel Owned by: rwaldron
Priority: high Milestone:
Component: dimensions Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:

jQuery 1.5.1 AND 1.5.2 (jsFiddle only offers 1.5.1 at the moment)

Firefox 4.0

Windows 7 Ultimate x64

I would have expected a value from $(document).innerWidth(), but instead it throws an exception.

Exception thrown: TypeError: elem.ownerDocument is null

Example code:

If you need more information, please ask.

Attachments (0)
Change History (4)

Changed April 07, 2011 01:47PM UTC by rwaldron comment:1

component: unfileddimensions
priority: undecidedhigh
status: newopen

Changed April 07, 2011 01:47PM UTC by rwaldron comment:2

owner: → rwaldron
status: openassigned

Changed April 16, 2011 06:18PM UTC by jboesch comment:3

Wondering if this is invalid. If you read

it says: "This method is not applicable to window and document objects; for these, use .width() instead."

Changed April 16, 2011 08:16PM UTC by timmywil comment:4

resolution: → invalid
status: assignedclosed

So it does. Now that I think about it, getting innerWidth from document doesn't make sense because the document itself can't have padding.