/// <summary>Runs a click which may bubble all the way to the root from the given element.</summary> /// <param name="element">The element to run a click on.</param> /// <param name="uiEvent">The event that represents the click.</param> public static void ClickOn(Element element, UIEvent uiEvent) { if (uiEvent.cancelBubble || element == null || element.Handler.IgnoreSelfClick) { return; } element.GotClicked(uiEvent); ClickOn(element.ParentNode, uiEvent); }
public override bool OnClick(UIEvent clickEvent) { // Who wants the click? That's the for element: Element forElement = GetFor(); if (forElement != null) { // Prevent any propagation - we sure don't want it clicking this element again (which may occur if // forElement is one of this elements kids and it propagated upwards). clickEvent.stopPropagation(); // Click it: forElement.GotClicked(clickEvent); } // Run this elements onmousedown/up etc. base.OnClick(clickEvent); return(true); }
/// <summary>Runs a click which may bubble all the way to the root from the given element.</summary> /// <param name="element">The element to run a click on.</param> /// <param name="uiEvent">The event that represents the click.</param> public static void ClickOn(Element element,UIEvent uiEvent){ if(uiEvent.cancelBubble || element==null || element.Handler.IgnoreSelfClick){ return; } element.GotClicked(uiEvent); ClickOn(element.ParentNode,uiEvent); }