google-code-export / zfdebug

Automatically exported from code.google.com/p/zfdebug
Other
1 stars 1 forks source link

Multiple JQuery Compatibility Issues #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I plugged this into a working site with JQuery, After spending quite a bit of 
time debugging, I finally found the following list of issues:

1. This module should NEVER set NoConflictMode(). NoConflictMode() unregisters 
the $ variable, which makes most common JQuery code fail.

2. The extra head stuff should be added just before the close of the head 
object, not at the beginning. This is important because, although ZFDebug 
checks whether JQuery is already loaded, it will currently always fail, because 
it always places itself and the test BEFORE the point where JQuery can possibly 
register.

3. You should use "$.ready(...)", not "window.onload = ...", to execute code 
when the page loads. Setting window.onload can break the normal ready() 
functionality.

4. Please allow an empty JQuery path to be provided in the options. If the path 
is empty, the entire test and code to load JQuery should be skipped. Programmer 
takes responsibility in this case to ensure that JQuery was loaded.

Original issue reported on code.google.com by JohnCren...@gmail.com on 1 Sep 2010 at 9:59

GoogleCodeExporter commented 9 years ago
Please retest with latest version (svn)...

Original comment by ncas...@gmail.com on 11 Sep 2010 at 11:43

GoogleCodeExporter commented 9 years ago
I looked through the code and your changes should fix all the problems I'm 
aware of, however, you may have introduced a new one. You replaced 
document.onmousemove and document.onmouseup, which will conflict with anything 
else trying to use these same events. Keeping the previous value and 
daisy-chaining (like you did with window.load) should fix that.

Original comment by JohnCren...@gmail.com on 11 Sep 2010 at 7:03