# StopPropagation()

> Stops the propagation of the event to other targets. All subscribers to the event on this target still receive the event.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.5/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public void StopPropagation()
```

### Remarks

The event is not sent to other elements along the propagation path. If the propagation is in the [PropagationPhase.TrickleDown](/engine/6000.5/script-reference/unityengine/uielements/propagationphase/trickledown.md) phase, this prevents event handlers from executing on children of the [\_currentTarget](/engine/6000.5/script-reference/unityengine/uielements/eventbase/currenttarget.md), including on the event's [\_target](/engine/6000.5/script-reference/unityengine/uielements/eventbase/target.md) itself, and prevents all event handlers using the [TrickleDown.NoTrickleDown](/engine/6000.5/script-reference/unityengine/uielements/trickledown/notrickledown.md) option from executing (see [CallbackEventHandler.RegisterCallback](/engine/6000.5/script-reference/unityengine/uielements/callbackeventhandler/registercallback.md)). If the propagation is in the [PropagationPhase.BubbleUp](/engine/6000.5/script-reference/unityengine/uielements/propagationphase/bubbleup.md) phase, this prevents event handlers from executing on parents of the [\_currentTarget](/engine/6000.5/script-reference/unityengine/uielements/eventbase/currenttarget.md).

This method has the same effect as [EventBase.StopImmediatePropagation()](/engine/6000.5/script-reference/unityengine/uielements/eventbase/stopimmediatepropagation.md) except on execution of other event handlers on the [\_currentTarget](/engine/6000.5/script-reference/unityengine/uielements/eventbase/currenttarget.md).

Calling this method does not prevent some internal actions to be processed, such as an element getting focused as a result of a [PointerDownEvent](/engine/6000.5/script-reference/unityengine/uielements/pointerdownevent.md).

Refer to the [Dispatch events](/engine/6000.5/manual/uitoolkits/uielements/uie-events/dispatching.md) manual page for more information and examples.

Additional Resources: [EventBase.StopImmediatePropagation()](/engine/6000.5/script-reference/unityengine/uielements/eventbase/stopimmediatepropagation.md)
