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

Slider movement causing random GetClientRects Errors

2 Answers 87 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Adam Beal
Top achievements
Rank 1
Adam Beal asked on 14 Jul 2009, 06:33 PM

I have a slider inside of an update panel and at random times when changing the values I get a GetClientRects error. I tried putting the following code after the </form> and after the scriptmanager tags and it doesn't trap this i when living in either spot:

 

 

<script type="text/javascript" language="javascript">

 

 

var oldDomEvent = Sys.UI.DomEvent;

 

Sys.UI.DomEvent =

function(rawEvent) { if (rawEvent.srcElement && typeof (rawEvent.srcElement.getClientRects) == "undefined") return; var evt = new oldDomEvent(rawEvent); for (var o in evt) this[o] = evt[o]; }

 

 

for (var o in oldDomEvent)

 

Sys.UI.DomEvent[o] = oldDomEvent[o];

 

 

</

 

script>

Any ideas?

 

2 Answers, 1 is accepted

Sort by
0
Adam Beal
Top achievements
Rank 1
answered on 14 Jul 2009, 07:58 PM
A little more info on this issue. I have a RadToolTipManager which is outside of the update panel. Interestingly when I remove this control the GetClientRects error goes away:

<telerik:RadToolTipManager ID="tipManager" runat="server" AutoTooltipify="true" Skin="Default" RelativeTo="Element" Position="TopLeft" ShowCallout="true" />

0
Tsvetie
Telerik team
answered on 16 Jul 2009, 11:12 AM
Hi Adam Beal,
I was able to reproduce the problem with the following code only in IE, in case I move the mouse over the dragHandle of the RadSlider and quickly move the dragHandle before the tooltip for it shows:
<asp:UpdatePanel ID="UpdatePanel1" runat="server"
    <ContentTemplate> 
        <telerik:RadSlider ID="RadSlider1" runat="server" AutoPostBack="true" OnValueChanged="RadSlider1_ValueChanged"
        </telerik:RadSlider> 
    </ContentTemplate> 
</asp:UpdatePanel> 
<telerik:RadToolTipManager ID="tipManager" runat="server" AutoTooltipify="true" Skin="Default" 
    RelativeTo="Element" Position="TopLeft" ShowCallout="true" /> 

The problem most probably is a result of the fact that the RadToolTip tries to show itself for the dragHandle, however, before that happens the dragHandle (which is part of the slider) is disposed.

For the time being, I can offer you one of the following approaches:
  1. Set ShowCallout=false.
  2. Place the following code right after the RadToolTipManager definition:
    <script type="text/javascript"
    Telerik.Web.UI.RadToolTipManager.prototype._adjustCallout = function(){}; 
    </script> 
  3. Set AutoTooltipify="false" for the RadToolTip manager and use its TargetControls collection to add the ids of the controls you want tooltipified.
All the best,
Tsvetie
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.
Tags
Slider
Asked by
Adam Beal
Top achievements
Rank 1
Answers by
Adam Beal
Top achievements
Rank 1
Tsvetie
Telerik team
Share this question
or