Tooltip goes offscreen when window resizes

2 posts, 0 answers
  1. Michael
    Michael avatar
    3 posts
    Member since:
    Dec 2012

    Posted 05 Dec 2012 Link to this post

    I have a RadTooltip that is placed inside of a RadGrid's header that is being displayed inside of a RadWindowManager.  When the RadWindow gets resized to a smaller area, the grid and it's columns resize appropriately however the expanded tooltip's position stays the same; which causes it to be hidden outside the bounds of the RadWindow because the RadWindow's dimensions are smaller.  I have the tooltip configured to be placed relative to the element that makes it display but it doesn't seem to stay relative to that element in the case of the radwindow shrinking in size.  It looks to be absolutely positioned once popped out.

    Is there a solution to this issue?
  2. Marin Bratanov
    Marin Bratanov avatar
    3555 posts

    Posted 07 Dec 2012 Link to this post

    Hi Michael,

    The RadToolTip is actually positioned absolutely. You can confirm this by inspecting its popup with your developer tools of choice. This means that resizing the browser would, generally, not affect its position even though it can affect elements with static position.

    What you can do is to call the updateLocation() method of the currently active tooltip when the window resize is done. How to get a reference to the currently shown tooltip is shown here (see the getCurrent static method) and this SO thread may be useful on handing the window.resize event.

    I also advise that you examine the Common Issues help article and make sure your tooltips cover the guidelines there - they have Width, Height, RelativeTo set. I also advise that you set their RenderInPageRoot property to true.

    I am attaching here a simple page that shows this in action together with a video that shows the behavior.

    Marin Bratanov
    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. DevCraft R3 2016 release webinar banner
Back to Top