Bug Tracker

Modify

Ticket #10790 (closed bug: duplicate)

Opened 18 months ago

Last modified 15 months ago

Error loading jQuery 1.7 with Modernizr in IE8

Reported by: Issy Owned by: Issy
Priority: high Milestone: None
Component: support Version: 1.7
Keywords: Cc:
Blocking: Blocked by:

Description

I get (usually) an error when loading jQuery 1.7 with Modernizr in IE8:
Message: 'null' ist Null oder kein Objekt ('null' is null or no object)
Line: 1658
Character: 2
Code: 0
URI:  http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.js

My Modernizr example for jquery:

Modernizr.load([
	{
		load: '//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.js',
		complete: function () {
			if ( !window.jQuery ) {
				Modernizr.load('/js/libs/jquery-1.7.js');
			}
		}
	}
]);



jQuery 1.6.4 is loading without any error.

Change History

comment:1 Changed 18 months ago by timmywil

  • Owner set to Issy
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to core

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate:  http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 18 months ago by Issy

  • Status changed from pending to new

Sorry, I can't reproduce it in jsFiddle. Anyway, it crashes after the block "Run fixed position tests at doc ready to avoid a crashrelated to the invisible body in IE8" at line 1658:

testElement.innerHTML = "";

5 lines before (line 1653) is it set to null:

testElement = container = null;

This is exactly my error message on IE7/IE8: 'null' is null or no object.

This looks to me a bit confusing.

comment:3 Changed 18 months ago by Issy

Ok, I take a look at  http://code.jquery.com/jquery-git.js and it seems to be corrected.

comment:4 Changed 18 months ago by timmywil

  • Priority changed from low to high
  • Resolution set to duplicate
  • Status changed from new to closed
  • Component changed from core to support

comment:5 Changed 18 months ago by timmywil

Duplicate of #10737.

comment:6 Changed 18 months ago by anonymous

I have the exact same error under IE8 (without Modernizr) but with jQuery loaded in a iframe if this can help.

comment:7 Changed 18 months ago by ngryman

Same issue. I use a home made script loader, perhaps this issue comes when jQuery is loaded dynamically by appending a new script tag...

comment:8 Changed 15 months ago by anonymous

I've had exactly the same thing using yepnope and IE7/IE8. I'm unsure as to what causes it. Updating jQuery to 1.7.1 fixed this error. Nothing obvious in the 1.7.1 changelog.

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.