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

Tooltip causes page to scroll to top

1 Answer 114 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Jonathan Torres
Top achievements
Rank 1
Jonathan Torres asked on 03 Feb 2010, 07:23 PM
I have a tooltip where the content is generated from a user control.  The tooltip is displayed when a user hovers over a node in the RadTree control.  The problem I have is when the tooltip appears on a node at the bottom of a tree, the page will scroll to the top and the tooltip will be displayed.  Is there a way to prevent the page from scrolling when the tooltip is displayed?

The usercontrol is loaded in the RadToolTipmanager1_AjaxUpdate event.  I am also using RadAjaxManager on the page but I guess it isn't configured correctly.

Thanks

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 09 Feb 2010, 09:50 AM
Hello Jonathan,

Indeed, what you report is expected since you are using AJAX to load the content of the tooltip - when a partial update is done, the scroll position is lost and this is related to general ASP.NET and AJAX and it is not directly related to the tooltip but to how the things work (you can easily reproduce it by using a standard asp update panel and no RadControls at all).

What I suggest is to save the scroll position before the OnAjaxUpdate event e.g in hidden fields and when the content is loaded to reset it back. You can find more information about this and also other techniques on how to persists the scroll position on the net, e.g you can start from here:

http://www.google.bg/#hl=bg&source=hp&q=scroll+position+ajax&meta=&rlz=1R2WZPA_enBG347&aq=f&oq=scroll+position+ajax&fp=a0599798b4eb5972


Sincerely yours,
Svetlina
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
ToolTip
Asked by
Jonathan Torres
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or