-
Notifications
You must be signed in to change notification settings - Fork 68
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
diydrones.com - fails inserting new content correctly on scrolling down due to outdated jQuery #412
Comments
Whenever you scroll to the bottom of the page, the page starts loading new content. However, it ends up adding the same entry again and again! Loading data, this code is involved: _d.html is the new list of articles from the server. A bit further down the stack, we hit this code:
The each command will loop through all nodes in a DOM fragment - including text nodes. And if a text node a is passed to this code:
it will throw because p.css() relies on getComputedStyle() which doesn't expect to be used with text nodes. I've verified that this error causes the problem. I'm not sure why this doesn't occur in other browsers. Perhaps the script uses a DOM parser that creates text nodes for whitespace in Firefox and uses a different approach in other browsers? |
Actually, getComputedStyle() doesn't throw in Chrome even if you pass a text node to it. That's why the failure occurs only in Firefox. |
This is basically failing in jQuery code
Which means their jQuery library is outdated since jQuery on GitHub has exactly the same fix I added above - here: We should suggest that they update jQuery. |
Bugs to make sure other browsers follow the spec too: |
This has been fixed in Chrome Blink and fails in the same way, also in Edge. This is not fixed in Safari WebKit, which is behind the curve. The site is created by http://diydrones.com/profile/zlitezlite The good news is that he is on github @zlite |
@billbonney could you help us find the right person for this issue at @diydrones thanks |
@karlcow diydrones.com is hosted on a platform supplied by ning.com platform. I'd recommend taking with them |
Thanks @billbonney |
This has been fixed. |
URL: http://diydrones.com/m?id=705844%3AMobilePage%3A857813
Browser / Version: Firefox Mobile 36.0
Operating System: Android
Problem type: Looks like the website has a bug.
Site owner: No
Steps to Reproduce
Expected Behavior:display new blog entries
Actual Behavior:displays last blig entry over and over
The text was updated successfully, but these errors were encountered: