Community
Participate
Working Groups
Reproducible with Controls Demo: 1. Start Controls Demo -> Button Tab 2. Open Cursor combo drop-down list and scroll it, to make the "null" selection not visible anymore 3. Click somewhere else to close the drop-down list. 4. Open the drop-list again - scroll offset is on the old position and the selected item is not visible. With the new Scrollbar implementation the ListItem#scrollIntoView() is not working anymore.
The scrollIntoView call is actually working, its more an issue of the order in which it is called: - list.setDisplay( true ) is called in Combo.js - flush - in Combo the lists appear event causes the scrollIntoView call - scrollIntoView works like expected, but the resulting dom-scroll-event is not fired until the javascript thread is free again. - Next in Scrollable#_onClientAppear "_syncClientArea" is called, which sets the clientArea (the actual list) back to the (unchanged) scroll-position stored in the ScrollBar. - After all that the dom-scroll-event is finally fired, triggering Scrollable#_onscroll, which then in turn calls "_syncClientArea", trying to store the new scroll position in the scrollbar, which should have happend before it got reset. So basically, the problem is a combination of the fact that dom-events dont get fired while javascript is processed and that Combo gets the appear event before the list itself does.
Correction: the second "_syncClientArea" should actually be "_syncScrollBars"
Fixed in CVS HEAD by calling "_syncScrollBars" explicitly after "scrollIntoView".