Revert "[Tizen] Fix focus issue after calling ClearFocus api" 61/186761/1
authorXianbing Teng <xb.teng@samsung.com>
Tue, 14 Aug 2018 06:56:54 +0000 (06:56 +0000)
committerXianbing Teng <xb.teng@samsung.com>
Tue, 14 Aug 2018 06:56:54 +0000 (06:56 +0000)
This patch doesn't cover mobile profile.

This reverts commit eb0e958e1f900ef19b9c5798a1dc4dc4782cf9c8.

Change-Id: Ib9ff5638548e8d5d75e7a76244522055dc8d4584

dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp

index 04990c7..3f398c5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -672,9 +672,12 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
           // Show focus indicator
           mIsFocusIndicatorEnabled = 1;
         }
+        else
+        {
+          // Move the focus towards left
+          MoveFocus(Toolkit::Control::KeyboardFocus::LEFT);
+        }
 
-        // Move the focus towards left
-        MoveFocus(Toolkit::Control::KeyboardFocus::LEFT);
         isFocusStartableKey = true;
       }
       else
@@ -692,9 +695,11 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
           // Show focus indicator
           mIsFocusIndicatorEnabled = 1;
         }
-
-        // Move the focus towards right
-        MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
+        else
+        {
+          // Move the focus towards right
+          MoveFocus(Toolkit::Control::KeyboardFocus::RIGHT);
+        }
       }
       else
       {
@@ -711,9 +716,12 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
         // Show focus indicator
         mIsFocusIndicatorEnabled = 1;
       }
+      else
+      {
+        // Move the focus towards up
+        MoveFocus(Toolkit::Control::KeyboardFocus::UP);
+      }
 
-      // Move the focus towards up
-      MoveFocus(Toolkit::Control::KeyboardFocus::UP);
       isFocusStartableKey = true;
     }
     else if (keyName == "Down" && !isAccessibilityEnabled)
@@ -723,9 +731,12 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
         // Show focus indicator
         mIsFocusIndicatorEnabled = 1;
       }
+      else
+      {
+        // Move the focus towards down
+        MoveFocus(Toolkit::Control::KeyboardFocus::DOWN);
+      }
 
-      // Move the focus towards down
-      MoveFocus(Toolkit::Control::KeyboardFocus::DOWN);
       isFocusStartableKey = true;
     }
     else if (keyName == "Prior" && !isAccessibilityEnabled)
@@ -735,9 +746,12 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
         // Show focus indicator
         mIsFocusIndicatorEnabled = 1;
       }
+      else
+      {
+        // Move the focus towards the previous page
+        MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
+      }
 
-      // Move the focus towards the previous page
-      MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
       isFocusStartableKey = true;
     }
     else if (keyName == "Next" && !isAccessibilityEnabled)
@@ -747,9 +761,12 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
         // Show focus indicator
         mIsFocusIndicatorEnabled = 1;
       }
+      else
+      {
+        // Move the focus towards the next page
+        MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
+      }
 
-      // Move the focus towards the next page
-      MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
       isFocusStartableKey = true;
     }
     else if (keyName == "Tab" && !isAccessibilityEnabled)