-
Notifications
You must be signed in to change notification settings - Fork 512
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
DomReady does not work when it reloads page. #2682
Comments
In order to properly investigate this issue, the assumed bug needs to be reproducible. Is there a gist or a page you can create that would reproduce this issue? Were there any JS errors? |
@diegoflorez I made a simple page myself to check this and it works as It should, no bug. If you can put a page online with this assumed bug so we can see/test it would be the best. Cheers! |
@GCheung55 You're right!, It is what I should do, so that you could fully understand what I was trying to explain. |
I think this is an issue with RequireJS interacting in a strange way with Mootools and causing some kind of race condition. Check this out if you need to run scripts after the dom is ready and you're using RequireJS: https://github.com/requirejs/domReady |
@diegoflorez thank you creating the example showing the problem! Could we fix this by adding |
Hey Guys, thanks for all your work. |
@diegoflorez could you share a jsFiddle reproducing that error and add some Browser info? what line does it point to? I don't see how |
@SergioCrisostomo I have just made the change that you have suggested in fix-2682 to the mootools-core-5.1 no compat. Remove the line 6033 and Add from 6034 to 6038. The line 6065 throws this error message: "TypeError: window is null" in Firefox 37; and this one: "Uncaught TypeError: Cannot read property 'addEvent' of null" in Chromium 41. The same version of mootools-core-5.1 without the fix, doesn't throw any error message. Thanks for your work and effort. |
I see now, nice with a demo page. So RequireJS is not providing the Maybe someone else more used to RequireJS will have some feedback soonish... |
[Opening Again] I have run 2 extra tests to this fix:
|
Using RequireJS's own As a side note I still think the fix is usefull, but that we can discuss in the pull request itself. Thank you @diegoflorez for nice input and demos to analyse this problem. |
i'm not sure if it help or not, but also i receive error on webstorm intelisense for this part: line: 5848
my version is 1.4.5 (get from nuget) |
En firefox 34.0.5 when it reloads the page, the code inside
is never called again, until you close the window/tab and reopen the page.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6930694-domready-does-not-work-when-it-reloads-page?utm_campaign=plugin&utm_content=tracker%2F22067&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22067&utm_medium=issues&utm_source=github).It's imposible to make a jsfiddle to show this behaviour.
I thinks this is a bug. Because you are trying to reload the page, so the DOM is for a new instance, ready.
The text was updated successfully, but these errors were encountered: