Set multiline input hint before IME activates 83/250583/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 29 Dec 2020 10:16:13 +0000 (19:16 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 30 Dec 2020 01:33:20 +0000 (10:33 +0900)
 - All input panel properties, such as layout, return key type, and input hint,
 should be set before input panel activates (or shows).

Change-Id: I72738eee2e772dd3f6358fa52c61ec7100e8a953
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp

index 23799c3..7e64b6e 100644 (file)
@@ -1514,6 +1514,9 @@ void TextEditor::OnKeyInputFocusGained()
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnKeyInputFocusGained %p\n", mController.Get() );
   if ( mInputMethodContext  && IsEditable() )
   {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor::OnKeyInputFocusGained %p\n", mController.Get() );
   if ( mInputMethodContext  && IsEditable() )
   {
+    // All input panel properties, such as layout, return key type, and input hint, should be set before input panel activates (or shows).
+    mInputMethodContext.NotifyTextInputMultiLine( true );
+
     mInputMethodContext.StatusChangedSignal().Connect( this, &TextEditor::KeyboardStatusChanged );
 
     mInputMethodContext.EventReceivedSignal().Connect( this, &TextEditor::OnInputMethodContextEvent );
     mInputMethodContext.StatusChangedSignal().Connect( this, &TextEditor::KeyboardStatusChanged );
 
     mInputMethodContext.EventReceivedSignal().Connect( this, &TextEditor::OnInputMethodContextEvent );
index fc09fd8..e87ba2f 100644 (file)
@@ -1519,7 +1519,9 @@ void TextField::OnKeyInputFocusGained()
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyInputFocusGained %p\n", mController.Get() );
   if ( mInputMethodContext && IsEditable() )
   {
   DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyInputFocusGained %p\n", mController.Get() );
   if ( mInputMethodContext && IsEditable() )
   {
+    // All input panel properties, such as layout, return key type, and input hint, should be set before input panel activates (or shows).
     mInputMethodContext.ApplyOptions( mInputMethodOptions );
     mInputMethodContext.ApplyOptions( mInputMethodOptions );
+    mInputMethodContext.NotifyTextInputMultiLine( false );
 
     mInputMethodContext.StatusChangedSignal().Connect( this, &TextField::KeyboardStatusChanged );
 
 
     mInputMethodContext.StatusChangedSignal().Connect( this, &TextField::KeyboardStatusChanged );