Force position off Screen

3 posts, 1 answers
  1. John
    John avatar
    28 posts
    Member since:
    Mar 2010

    Posted 02 Sep 2011 Link to this post

    Hi there,

    I have a list of item and each item is clickable to popup a tooltip.  I'm looking to position the tooltip popup relative to the element, positioned bottom center.  However, when clicking on an item near the bottom of the screen, the tooltip popup recalculates the position so that it doesn't get displayed off the screen.  I am wondering, is it possible to force the popup to go off the screen to maintain the bottom center popup position.

  2. Answer
    Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 07 Sep 2011 Link to this post

    Hello John,

    What you want to achieve is not available out of the box because the more intuitive behavior for a tooltip in most of the scenarios is to be "intelligent enough" to detect browser boundaries and to reposition itself. However, you could override this behavior by putting the following script I prepared for you on your page:

    <script type="text/javascript">
        var $T = Telerik.Web.UI;
        $T.RadToolTip.prototype._oldCreateUI = $T.RadToolTip.prototype._createUI;
        $T.RadToolTip.prototype._createUI = function () {
            if (this._popupBehavior) this._popupBehavior.set_keepInScreenBounds(false);

    For your convenience I prepared and attached a sample page - resize the browser to a smaller size and show the tooltip - it will not reposition. Please, test my suggestion and let me know how it goes.

    All the best,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft R3 2016 release webinar banner
  4. John
    John avatar
    28 posts
    Member since:
    Mar 2010

    Posted 07 Sep 2011 Link to this post

    Perfect, exactly what I'm looking for.  Thanks!!
Back to Top