[AT-SPI] Support gaining keyboard focus in TextField, TextEditor 30/243630/21
authorArtur Świgoń <a.swigon@samsung.com>
Tue, 8 Sep 2020 16:29:34 +0000 (18:29 +0200)
committerArtur Świgoń <a.swigon@samsung.com>
Fri, 23 Oct 2020 13:07:00 +0000 (15:07 +0200)
Change-Id: If52491ec863ba705fea8775bce0f44c70522e32e

dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-editor-impl.h
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.h

index c28f3d5..5aa9ce2 100644 (file)
@@ -1471,6 +1471,12 @@ void TextEditor::OnKeyInputFocusLost()
   EmitKeyInputFocusSignal( false ); // Calls back into the Control hence done last.
 }
 
+bool TextEditor::OnAccessibilityActivated()
+{
+  SetKeyInputFocus();
+  return true;
+}
+
 void TextEditor::OnTap( const TapGesture& gesture )
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnTap %p\n", mController.Get() );
index d5603b0..5d0df97 100755 (executable)
@@ -152,6 +152,11 @@ private: // From Control
   void OnKeyInputFocusLost() override;
 
   /**
+   * @copydoc Control::OnAccessibilityActivated()
+   */
+  bool OnAccessibilityActivated() override;
+
+  /**
    * @copydoc Control::OnTap()
    */
   void OnTap( const TapGesture& tap ) override;
index b452c14..0c9f544 100644 (file)
@@ -1536,6 +1536,12 @@ void TextField::OnKeyInputFocusLost()
   EmitKeyInputFocusSignal( false ); // Calls back into the Control hence done last.
 }
 
+bool TextField::OnAccessibilityActivated()
+{
+  SetKeyInputFocus();
+  return true;
+}
+
 void TextField::OnTap( const TapGesture& gesture )
 {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnTap %p\n", mController.Get() );
index 6b2d419..157e832 100755 (executable)
@@ -144,6 +144,11 @@ private: // From Control
   void OnKeyInputFocusLost() override;
 
   /**
+   * @copydoc Control::OnAccessibilityActivated()
+   */
+  bool OnAccessibilityActivated() override;
+
+  /**
    * @copydoc Control::OnTap()
    */
   void OnTap( const TapGesture& tap ) override;