Bug Tracker

Opened 12 years ago

Closed 12 years ago

#8074 closed bug (invalid)

Error in acid3 page

Reported by: FamLam <[email protected]…> Owned by: FamLam <[email protected]…>
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:


[browser: Chrome 10] The easiest way to reproduce this is to rename the jquery js file to jquery.user.js (e.g. make it look like a userscript for the browser) and then install it. Then visit http://acid3.acidtests.org/

You'll see an error in the console log (occuring 4 times): Uncaught TypeError: Cannot set property 'display' of null

I used the latest development build.

Change History (3)

comment:1 Changed 12 years ago by jitter

Owner: set to FamLam <[email protected]…>
Status: newpending

Umm... huh? What are you trying to say? What's happening, how is the error triggered, on trying to do what operation. Please provide a less obscure information when making a bug report.

If you have a specific bug to report please submit a reduced test case, which reproduces the issue you are experiencing, on http://jsfiddle.net. So that we can investigate this issue further.

Also note that Chrome 10 is the development version which clearly isn't a supported browser by jQuery.

How to report bugs

comment:2 Changed 12 years ago by FamLam <[email protected]…>

Status: pendingnew

What's happening: In the console log an error message is shown.

How is the error triggered: just add the main JQuery script, you don't have to call any function of it.

This is the case where I noticed it: We use this in AdBlockforChrome. We insert JQuery into every page. However, if we insert it into the acid3 test, we suddenly see errors in the console log. [see my initial post for the error message]. However, we didn't call any JQuery function ourselves, so I tested if it also happened when I only insert JQuery, without the other parts of the extension (this can be done by calling it jquery.user.js, which makes chrome think it is a userscript, a one-file content script).

It also happens on Chrome 8 (the stable build) and Chrome 9 (beta).

I cannot create a test case as I don't know what exactly makes it fail. The failing lines are

	jQuery.support = {};

	var root = document.documentElement,
		script = document.createElement("script"),
		div = document.createElement("div"),
		id = "script" + jQuery.now();

	div.style.display = "none";
	div.innerHTML = "   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";

As it happens on the acid3 test page, it can also happen on other pages.

Is this enough information?

comment:3 Changed 12 years ago by jitter

Resolution: invalid
Status: newclosed

To be honest this still isn't even close to a reduced test case as described in How to report bugs.

You are basically saying: I include jQuery on some page and something fails, but I don't want to debug it myself to figure out if this is a legitimate bug or not. This isn't really nice considering that we are working on jQuery for free in our free time and you are requesting that we figure out if there even is a bug or not. We better spend our time on tickets which have a clear description of what is failing, a minimal test case and possible even a hint on how to fix it.

Anyway I took a minute to check what might cause this exceptions by just including jQuery. What happens is that your extension tries to include jQuery on every page that gets loaded, on the acid3 page this includes some xml files being loaded (svg, xml, ...). jQuery isn't meant to be loaded in xml files and thus it fails and exception are thrown. There are crucial differences when running in a xml document. E.g. an element created with document.createElement has no style property (one of the errors) also there is no document.body element which is why $("body") fails and causes your second error object has no method bind.

So there is no bug. Your extension just tries to load jQuery in XML pages which isn't supported.

Note: See TracTickets for help on using tickets.