[NUI] Cancel pressed state properly on touch events (#3120)
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>
Fri, 28 May 2021 11:14:45 +0000 (20:14 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 1 Jun 2021 08:03:31 +0000 (17:03 +0900)
src/Tizen.NUI.Components/Controls/RecyclerView/Item/RecyclerViewItem.Internal.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Item/RecyclerViewItem.cs

index 23a1b5f..c89d00b 100755 (executable)
@@ -120,6 +120,8 @@ namespace Tizen.NUI.Components
                     UpdateState();
                     return true;
                 case PointStateType.Interrupted:
+                case PointStateType.Motion:
+                case PointStateType.Leave:
                     IsPressed = false;
                     UpdateState();
                     return true;
@@ -155,11 +157,6 @@ namespace Tizen.NUI.Components
                                 }
                             }
                         }
-                        else
-                        {
-                            // Extension : Extension?.SetTouchInfo(touch);
-                            UpdateState();
-                        }
 
                         if (clicked)
                         {
@@ -167,6 +164,8 @@ namespace Tizen.NUI.Components
                             OnClickedInternal(eventArgs);
                         }
 
+                        UpdateState();
+
                         return true;
                     }
                 default:
index ce8d840..71cb3f9 100755 (executable)
@@ -236,16 +236,14 @@ namespace Tizen.NUI.Components
                             }
                         }
                     }
-                    else
-                    {
-                        UpdateState();
-                    }
 
                     if (clicked)
                     {
                         ClickedEventArgs eventArgs = new ClickedEventArgs();
                         OnClickedInternal(eventArgs);
                     }
+
+                    UpdateState();
                 }
             }
             return base.OnKey(key);