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

Trouble with tooltip positioning

3 Answers 65 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Christofer Hagstedt
Top achievements
Rank 1
Christofer Hagstedt asked on 08 Apr 2010, 10:10 PM
Hi,

I'm having trouble with the positioning of a radtooltip.

I have a page containing a sort of quiz. It has a next and a previous button. To the buttons I add a page validation summary type of function. The summary is created serverside and opened.

My tooltip code looks lite:

    <telerik:RadToolTip runat="server" ID="valSumPop" Animation="None" Skin="Simple" RelativeTo="Element" ShowEvent="FromCode" IsClientID="false" HideEvent="LeaveToolTip">
        <div style="padding: 5px;">
            <asp:Literal runat="server" ID="litValSum" />
        </div>
    </telerik:RadToolTip>

and my serverside code looks something like this:

string btID = ((LinkButton)sender).ID.ToString();
            valSumPop.TargetControlID = btID;
            valSumPop.Width = Unit.Pixel(125);

            string[] valStr = valSumText.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);

            if (valStr.Length > 0)
            {
                litValSum.Text = guiText.getGuiText("validationText", langId, companyId) + "<br />";

                foreach (string s in valStr)
                {
                    litValSum.Text += s + "<br />";
                }

                valSumPop.Show();
            }

I attached 3 images to illustrate what happens. If I click the next button the tooltip appears below the button and far to the right. It also seems broken. The arrow is directly below the button but offset about 50-100 px.

If the previous button is clicked once then the next button can be clicked and the tooltip is positioned properly.

Does anyone know what causes this?

Thanks

/Christofer


3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 14 Apr 2010, 09:52 AM
Hi Christofer,

Your code seems to be correct and the only thing I can assume that might be causing the issue is that the DOCTYPE declaration you have is not the correct one. Please, make sure that your page is XHTML compliant and test again. We are continuously working on improving the behavior when the page is in quirks mode but there are still some challenges in this matter.

If this does not help, please prepare a sample, fully runnable reproduction demo, open a new support ticket and send it to me along with detailed explanations and I will do my best to help.


Kind regards,
Svetlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Christofer Hagstedt
Top achievements
Rank 1
answered on 14 Apr 2010, 11:47 AM
Hi,

Our pages are Xhtml compliant but we do run them in quirks mode.  I tried changing to strict mode in our dev environment and it does seem to solve the problem but we are not able to change this in production at this time.

I've run across a similiar behavior in a previous project where tooltips with an offset changed from topcenter to bottomcenter. We solved it that time by setting the initial direction to the opposit of what was intended and let the tooltips change by themselfs. Is there a default behaviour that explains why this may happen?

/Christofer
0
Svetlina Anati
Telerik team
answered on 19 Apr 2010, 09:50 AM
Hello Christofer,

Indeed, the dynamic repositioning of the tooltip and its callout causes the problem. What I can suggest is to test whether overriding the repositioning will help. To do so, please include the following script on your page:

<script type="text/javascript">      
             
     Telerik.Web.UI.RadToolTip.prototype._adjustCallout = function()      
  {      
        
  };      
      </script>


Regards,
Svetlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ToolTip
Asked by
Christofer Hagstedt
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Christofer Hagstedt
Top achievements
Rank 1
Share this question
or