Revert "Fix focus issue after calling ClearFocus api" 60/186760/1
authorxb.teng <xb.teng@samsung.com>
Tue, 14 Aug 2018 06:55:09 +0000 (14:55 +0800)
committerxb.teng <xb.teng@samsung.com>
Tue, 14 Aug 2018 07:01:28 +0000 (15:01 +0800)
I revert this patch, because it doesn't cover mobile profile.
Mr. Sun upload a new patch for it:
https://review.tizen.org/gerrit/#/c/186741

This reverts commit f7e78caead4596a66b750444e77343856432d36d.

Change-Id: I8aef3d12907d74af849be9f061f92d65b27dea17

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

index a20808c..3555b3c 100644 (file)
@@ -673,9 +673,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
@@ -693,9 +696,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
       {
@@ -712,9 +717,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)
@@ -724,9 +732,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)
@@ -736,9 +747,11 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
         // Show focus indicator
         mIsFocusIndicatorEnabled = 1;
       }
-
-      // Move the focus towards the previous page
-      MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
+      else
+      {
+        // Move the focus towards the previous page
+        MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
+      }
 
       isFocusStartableKey = true;
     }
@@ -749,9 +762,11 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
         // Show focus indicator
         mIsFocusIndicatorEnabled = 1;
       }
-
-      // Move the focus towards the next page
-      MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
+      else
+      {
+        // Move the focus towards the next page
+        MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
+      }
 
       isFocusStartableKey = true;
     }