Consider the following JavaScript code
I recently made a change where I calculate the mouse position and the window position to say (semantically), if the user has clicked on a link on the bottom of the window, set the position of the tooltip to the upper right else set the position to the lower right. It appears to work at first glance, with the tooltip popping up correctly. However, after a couple of clicks, it appears as though the tooltip is losing it's target control ID. For example, the tooltip will pop up in the right direction, just on the existing control ID (link). If I take out the position code it works fine but always has the tooltip on the bottom which causes users to scroll. I've really been scratching my head on this so any help is appreciated.
var radToolTip = $find(toolTipClientId);
radToolTip.set_targetControlID(""); // Fix provided by Telerik b/c target control id is list in update panel
radToolTip.set_targetControlID(sender.id);
if (getMousePosition() > (getWindowHeight() / 2)) { radToolTip.set_position(Telerik.Web.UI.ToolTipPosition.TopRight); }
else { radToolTip.set_position(Telerik.Web.UI.ToolTipPosition.BottomRight); }
radToolTip.show();
I recently made a change where I calculate the mouse position and the window position to say (semantically), if the user has clicked on a link on the bottom of the window, set the position of the tooltip to the upper right else set the position to the lower right. It appears to work at first glance, with the tooltip popping up correctly. However, after a couple of clicks, it appears as though the tooltip is losing it's target control ID. For example, the tooltip will pop up in the right direction, just on the existing control ID (link). If I take out the position code it works fine but always has the tooltip on the bottom which causes users to scroll. I've really been scratching my head on this so any help is appreciated.