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

RadToolTip fails in IE unless Position set to Center

2 Answers 128 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
ATX
Top achievements
Rank 1
ATX asked on 16 Mar 2009, 03:20 PM
Apologies if this potential bug has already been isolated.

In Q1 2009 (version 2009.1 311 - March 11, 2009)...
RadToolTip Show() throughs a javascript error if Position is not set or set to values other than "Center".
The javascript error is 'window' is null or not an object.
The error occurs in Internet Explorer (IE) but not FireFox or Chrome. 
I have not tested other browsers or all possible Position values.

The following simplified code demonstrates the behavior:

The following works (Position value is set)

<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <telerik:RadToolTip ID="RadToolTip1" runat="server" HideEvent="ManualClose" Position="Center">
                <br /><hr />Tool Tip Message
            </telerik:RadToolTip>
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
        </div>    
    </form>
</body>

The following fails (Position value is not set)

<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <telerik:RadToolTip ID="RadToolTip1" runat="server" HideEvent="ManualClose">
                <br /><hr />Tool Tip Message
            </telerik:RadToolTip>
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
        </div>    
    </form>
</body>

CodeBehind
using System;
public partial class TestToolTip : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
                    RadToolTip1.Show();
    }
}

Thank you for your prompt attention to this matter.



2 Answers, 1 is accepted

Sort by
0
Accepted
Svetlina Anati
Telerik team
answered on 16 Mar 2009, 03:36 PM
Hi ATX,

I assume what might be causeing this issue, would you please test whether  including the following script fixes the issue:

   
        <script type="text/javascript">  
         Telerik.Web.UI.RadToolTip.prototype._oldAdjustCallout = Telerik.Web.UI.RadToolTip.prototype._adjustCallout;  
          
       Telerik.Web.UI.RadToolTip.prototype._adjustCallout = function()  
    {  
          if(!this.get_targetControl()) return;  
          this._oldAdjustCallout();    
    };  
        </script> 



Sincerely yours,
Svetlina
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ATX
Top achievements
Rank 1
answered on 16 Mar 2009, 04:12 PM
Hi Svetlina,

This appears to work. 

I included the script in the demonstration code above and various -- more complex -- scenarios.  Nothing has thrown an exception.

Thank you for your prompt and effective response.
Tags
ToolTip
Asked by
ATX
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
ATX
Top achievements
Rank 1
Share this question
or