From 87b89534b3b38de787b2653302e60c063ecc9e96 Mon Sep 17 00:00:00 2001 From: Taehyub Kim Date: Tue, 8 Mar 2022 22:07:20 +0900 Subject: [PATCH] [NUI] Prevent to call button up event when button is not pressed --- src/Tizen.NUI.Components/Controls/Button.Internal.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Tizen.NUI.Components/Controls/Button.Internal.cs b/src/Tizen.NUI.Components/Controls/Button.Internal.cs index e7aeb0e..b82b418 100755 --- a/src/Tizen.NUI.Components/Controls/Button.Internal.cs +++ b/src/Tizen.NUI.Components/Controls/Button.Internal.cs @@ -127,7 +127,10 @@ namespace Tizen.NUI.Components return true; case PointStateType.Up: { - bool clicked = isPressed && IsEnabled; + if (!isPressed) + { + return true; + } isPressed = false; @@ -142,11 +145,8 @@ namespace Tizen.NUI.Components UpdateState(); } - if (clicked) - { - ClickedEventArgs eventArgs = new ClickedEventArgs(); - OnClickedInternal(eventArgs); - } + ClickedEventArgs eventArgs = new ClickedEventArgs(); + OnClickedInternal(eventArgs); return true; } -- 2.7.4