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

2 posts, 0 answers
  1. Phil Hadley
    Phil Hadley avatar
    24 posts
    Member since:
    Sep 2009

    Posted 23 Apr 2012 Link to this post

    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
  2. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 24 Apr 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top