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

ToolTip Modal Problem

1 Answer 72 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Torben Frølund
Top achievements
Rank 1
Torben Frølund asked on 27 May 2008, 10:02 AM
Hello!

I have discovered a problem with the ToolTip control when it is used in modal mode. If a user click on the page when the modal layer is displayed, the layer will not unload againg unless you reload the page.

The problem also present on the demo site: http://www.telerik.com/DEMOS/ASPNET/Prometheus/ToolTip/Examples/Modality/DefaultCS.aspx

Hope that someone has a solution. Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Accepted
Tervel
Telerik team
answered on 29 May 2008, 08:00 AM
Hi Michael,

We were able to reproduce the issue. It occurs as a result of "miscommunication" between the "modality" module and the tooltip controler module tracking mouse clicks outside of the tooltip.

We fixed the problem in our internal build, and it will appear in the next service pack. As a temporary workaround we suggest pasting the following client script on your page above the RadToolTip declaration:

<script>
    Telerik.Web.UI.RadToolTipControllerClass.prototype._hideOnBodyClick = function(e)  
    {    
        var wasHidden = false;     
        if (this._activeToolTip != null && !this._activeToolTip.isModal())  
        {     
           //We need to check whether the element that initiated the click is a child of the tooltip             
           var tooltip = this._activeToolTip;             
           if (tooltip._isMouseOverElement(e, tooltip._tableElement)) return;  
           //Else make a request ot the tooltip to hide     
           wasHidden = this._activeToolTip.hide(true);  
        }  
          
        if (wasHidden) this._activeToolTip = null;  
    }; 
<script>


Best regards,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
Torben Frølund
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Share this question
or