From cdac3582cf1eb3b59e774801e2616d7d98af451c Mon Sep 17 00:00:00 2001 From: "Simon (Darkside) Jackson" Date: Wed, 1 Feb 2023 15:32:49 +0000 Subject: [PATCH] Added validation that the cursor is within the component when the pointer is down --- UnityEngine.UI/UI/Core/Selectable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnityEngine.UI/UI/Core/Selectable.cs b/UnityEngine.UI/UI/Core/Selectable.cs index 82709f1..a4262f5 100644 --- a/UnityEngine.UI/UI/Core/Selectable.cs +++ b/UnityEngine.UI/UI/Core/Selectable.cs @@ -583,7 +583,7 @@ protected SelectionState currentSelectionState { if (!IsInteractable()) return SelectionState.Disabled; - if (isPointerDown) + if (isPointerDown && isPointerInside) return SelectionState.Pressed; if (hasSelection) return SelectionState.Selected;