[ 13 posts ] Go to page Previous1, 2

Satyen Desai

YUI Developer

  • Username: sdesai
  • Joined: Tue Dec 09, 2008 4:17 pm
  • Posts: 302
  • GitHub: sdesai
  • Gists: sdesai
  • YUI Developer
  • Offline
  • Profile

Re: ScrollView Paginator with Google Chrome problems

Post Posted: Wed Jun 29, 2011 3:23 pm
+0-
If it turns out to be a bug please file it, so that it bubbles up for review.

Satyen Desai

YUI Developer

  • Username: sdesai
  • Joined: Tue Dec 09, 2008 4:17 pm
  • Posts: 302
  • GitHub: sdesai
  • Gists: sdesai
  • YUI Developer
  • Offline
  • Profile

Re: ScrollView Paginator with Google Chrome problems

Post Posted: Thu Jun 30, 2011 12:44 pm
+0-
This is the root issue for this bug:

http://code.google.com/p/chromium/issue ... l?id=88019

I'll need to change ScrollView to account for it, but that's what is fundamentally behind both issues you mention. In one case the delegate listener is firing a DOMSubtreeModified, which the ScrollView is responding to and recalculating it's content dimensions. In the other you're changing content, which results in the DOMSubtreeModified event, which ScrollView is responding to, and recalculating it's content dimensions.

Due to the change in Chrome behavior mentioned in the report above (there a reasonable argument for the current Chrome behavior being correct - although browsers differ about it - Safari for example doesn't have the same behavior) the recalculated dimensions end up being incorrect if the ScrollView has been scrolled (translated).

The workarounds are:

a) If the content size isn't really changing, you can unsubscribe the DOMSubtreeModified handler, which will fix both your issues:

sv.get("contentBox").detach("DOMSubtreeModified");

b) If the content size is changing (so scrollview really does need to recalculate it's bounds), you can scrollTo(0,0) (which will set the translate back to 0,0) before changing content, and then scroll back to the original position.

I'll work on a fix for the next release, based on the feedback I get for the above bug.

Mr. Chris

  • Username: teamcritter
  • Joined: Fri Feb 18, 2011 2:11 pm
  • Posts: 11
  • Offline
  • Profile

Re: ScrollView Paginator with Google Chrome problems

Post Posted: Thu Jun 30, 2011 12:57 pm
+0-
This is excellent info Satyen!

Unsubscribing the DOMSubtreeModified handler did the trick. That's exactly what I needed to do to prevent the issues I encountered. Works perfectly.

Also, thank you for the tips re. if the content size does change.

Again, I really appreciate your time. You've been a great help. Thank you.
  [ 13 posts ] Go to page Previous1, 2
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum