This is a migrated thread and some comments may be shown as answers.

Why does scrollIntoView() scroll when it doesn't need to?

1 Answer 33 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Phil Hadley
Top achievements
Rank 1
Phil Hadley asked on 23 Apr 2012, 09:22 PM
The behavior I'm seeing is that scrollIntoView() modifies the position of the scrollbar even when the node in question is already in view.  Is there a way to prevent this?  In attempting to accomplish this, I haven't been able to find a property on the node that describes whether it is already in view.  Can anyone help?

Phil

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 24 Apr 2012, 04:34 PM
Hi Phil,

 
Normally the scrollIntoView() function causes the Node to scroll into view, aligning the Node to the bottom of the TreeView area. This function repositions the TreeView's scrollbars, not the scrollbars for the page itself and currently there is no property that describes whether the node is in view or not. 

Would you please proved the code that should be used in order to reproduce this unusual behavior locally because the scenario is not very clear?  

Greetings,
Plamen Zdravkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeView
Asked by
Phil Hadley
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or