| Page 2 of 2 | [ 13 posts ] | Go to page Previous1, 2 |
|
If it turns out to be a bug please file it, so that it bubbles up for review.
|
|
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. |
|
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. |
| Page 2 of 2 | [ 13 posts ] | Go to page Previous1, 2 |
| 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 |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group