View Full Version : [CLOSED] Incorrect Element.scroll() / scrollTo() behaviour when animation enabled

7 Oct 2010, 3:30 AM
Ext version tested:

Ext 3.2.1
Ext 2.1

Adapter used:


css used:

only default ext-all.css

Browser versions tested against:

Chrome 7.0.517.24 beta (buggy!)
Chrome 6.0.472.63 (OK, tested under Ubuntu & Win 7)
FF 3.6.10 (OK)
Opera 10.62 (OK)

Operating System:

Ubuntu 10.04

When we have a container with both horizontal and vertical scroll, calling el.scroll() or el.scrollTo() with animation results to incorrect scrolling behaviour:
instead of performing just horizontal or just vertical scroll, scrolling is made on both sides. See example b

Test Case:

// Lets just insert in page a container with overflow.
tag: 'div',
html: '<div id="test-container" style="position: absolute; top: 0; left: 0; width: 200px; height:200px; overflow: auto; white-space: nowrap; z-index: 999; background: #e5e5e5;"><div style="width: 300px; height: 600px; border: solid 1px green; position: absolute; top: 10px; left: 10px;"</div><div style="width: 300px; height: 600px; border: solid 1px red; position: absolute; top: 620px; left: 220px;"</div>'

// Fetch that container
cont = Ext.get('test-container');

// Manually move around horizontal and vertical scrollbars
// ...

// Now call the scroll routine with animation
cont.scroll('t', 200, {duration: 3}) Steps to reproduce the problem:
Just copy&paste the above code in javascript console. You can do it right here on the forum!
I tried it on this forum (Ext 2.1) and in my project (Ext 3.2.1).

The result that was expected:
The container will be scrolled only vertically

The result that occurs instead:
The container is scrolled both horizontally and vertically.

See attached image.

Debugging already done:
It seems that the bug is somewhere in Ext.Lib.Anim.scroll.
Initial values in scrollTo() are calculated correctly before calling

The problem appears only when animation is enabled, without animation everything works perfectly.
This bug is very weird!

UPDATE. Sorry I forgot to edit the topic title, please add the 'in Chrome 7' after the word 'behaviour'

15 Oct 2010, 10:14 AM
It's still too early for us to address bugs for the new Chrome 7 beta release. There are other issues with Chrome 7 beta. I'm marking this thread as close.

25 Oct 2010, 12:43 AM
Fortunately this issue is absent in Chrome 7 Stable! You can close the thread.