Skip to content

Don't overwrite an existing jQuery library when outputting the profiler #2014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

rk
Copy link
Contributor

@rk rk commented May 23, 2013

It's nice to have the profiler up, but I noticed that it started changing my jQuery's behavior when I upgraded to jQuery 1.9. So I figured we should only write the fallback if no other jQuery library was loaded.

It's nice to have the profiler up, but I noticed that it started changing my jQuery's behavior when I upgraded to jQuery 1.9. So I figured we should only write the fallback if no other jQuery library was loaded.
@rk
Copy link
Contributor Author

rk commented May 23, 2013

I just realized that #2013 by @juukie14 is identical with my pull request. (I honestly didn't see his either.) Pick whatever you prefer.

@juukie
Copy link
Contributor

juukie commented May 23, 2013

Nice to know I'm not the only one who would like to have a change for this ;)

@barryvdh
Copy link
Contributor

The same change was suggested in the Laravel4 port; loic-sharma/profiler#24

But that gave me problems. And I think the profiler uses the noConflict option, for this reason, right?

@rk
Copy link
Contributor Author

rk commented May 28, 2013

@barryvdh The escaping is for older browser support. Remember the CDATA stuff and XHTML? Well, this is widely supported and won't mess with an older browser.

The noConflict option is so that the $ function is not aliased to jQuery; so far as I know it has no effect against jQuery loading itself into the jQuery object. So, it won't create a jQuery173 object but will write itself to jQuery and overwrite any previously loaded copies of the library. Just load an L3 project and play with the console. Eventually you will find something missing.

@barryvdh
Copy link
Contributor

Well yeah, I just looked at html5 boilerplate, and they don't feel like it is neccesary, while they support atleast IE7; https://github.com/h5bp/html5-boilerplate/blob/master/index.html#L28

But I started having trouble when a similar patch was supplied to the L4 profiler..

@rk
Copy link
Contributor Author

rk commented May 28, 2013

What trouble happened? If you describe it, I can probably tell you why.

@barryvdh
Copy link
Contributor

Well, I haven't really figured out what it was exactly, only that it started happening since that change, and when the change was reverted, it was fixed.
It stopped TinyMCE (3.x) from loading, and gave a console error (but can't exactly remember the error)

@rk
Copy link
Contributor Author

rk commented May 28, 2013

Well, without this code I'm experiencing trouble of my own. Custom selectors and plugin don't work from the console for debugging, and trying to troubleshoot code has become complicated thanks to 1.7.3 overwriting 1.9.1 and all the plugins that have already been loaded.

Since you haven't given me the console output, I have to say that it's a version conflict and nothing more. You're probably using a version of TinyMCE incompatible with one of the versions of jQuery.

@taylorotwell
Copy link
Member

Duplicate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants