PDA

View Full Version : Quirky Behavior with scrollIntoView



Danek1313
15 Dec 2010, 10:18 AM
So in my application, I have a panel with a bunch of fieldsets. In the panel's toolbar, I made a ComboBox with a data entry for each fieldset. When the user chooses one of the fieldsets in the list, the panel scrolls to the desired fieldset.

The problem is, scollIntoView() stops once the whole elemetn is in view. Thus, the fieldset is at the bottom of the visible portion of the panel once the scrolling is finished.

I would much prefer it to scroll so that the desired fieldset is at the top.

I added a command to scroll to the last fieldset first, then up to the desired one. This works, but there is a flash as it quickly jumps to the bottom, then up. But, this does place the desired fieldset at the top.

Does anyone know how to directly scroll so that the element is at the top of the viewable portion of the panel? Thanks for your help!

Danek1313
17 Dec 2010, 7:18 AM
Update: I still haven't found a way to scroll a fieldset into view to the top of the scrollable panel. If anyone out there has, I would greatly appreciate your solution!