Categories | Question details Back To List | ||
In the tree when using OnMouseIn to squeeze html out of auto-tooltips, item styles are sometimes left in the wrong state In the tree when using OnMouseIn to squeeze html out of auto-tooltips, item styles are sometimes left in the wrong state. I tried to do the following (edited because it was in vb render trigger) oTree.attachEvent("onMouseIn", function(sNodeID){ BaseTreeMouseIn(oTree, sNodeID); } ); where function BaseTreeMouseIn(oTree, sNodeID) { var sTooltipOrg = oTree.getItemTooltip(sNodeID); if( AppRoot.IsEmpty(sTooltip) ) { sTooltipOrg = oTree.getItemText(sNodeID); } var sTooltip = sTooltipOrg.replace(/<\/?[^>]+(>|$)/g, ''); if( sTooltip != sTooltipOrg ) { oTree.setItemText(sNodeID,oTree.getItemText(sNodeID),sTooltip); } } If I hover over items in a large tree quickly moving from itme to item sometimes the display gets out of whack (multiple items have the onmoseover type style). I tried various tricks involving setTimeout, which vastly improved things, but the problem still occurs occasionally, both in IE7 and IE8. Any ideas on how to fix the problem, short of losing the nice effect of have a distinct style when the mouse is over an item, or having to explicitly set the tooltips (which would nearly double the size of the client xml)? Thanks in advance for any help, Tom Answer posted by Alex (support) on Aug 10, 2009 06:49 Hello, the issue can be caused by some error that occurs in BaseTreemouseIn function. Try to place this code into try - catch block. If it solves the issue, the reason for the issue is somewhere in your code..: function BaseTreeMouseIn(oTree, sNodeID) try{ } catch(e){} Answer posted by TomHawkins on Aug 11, 2009 05:07 I put everything inside a try catch (I was very hopeful as that would have been easy) -- but the problem remains.
Answer posted by Alex (support) on Aug 11, 2009 05:18 Please, provide the sample or direct link to the problematic page (it can be sent to support@dhtmlx.com) |