Skip to content

Commit

Permalink
Support TextInputType.none in TextInputChannel (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
JSUYA authored Dec 2, 2024
1 parent b0fd447 commit 3fa9201
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions flutter/shell/platform/tizen/channels/text_input_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ constexpr char kClearClientMethod[] = "TextInput.clearClient";
constexpr char kSetClientMethod[] = "TextInput.setClient";
constexpr char kShowMethod[] = "TextInput.show";
constexpr char kHideMethod[] = "TextInput.hide";
constexpr char kNoneInputType[] = "TextInputType.none";
constexpr char kMultilineInputType[] = "TextInputType.multiline";
constexpr char kUpdateEditingStateMethod[] =
"TextInputClient.updateEditingState";
Expand Down Expand Up @@ -132,7 +133,9 @@ void TextInputChannel::HandleMethodCall(
const std::string& method = method_call.method_name();

if (method.compare(kShowMethod) == 0) {
input_method_context_->ShowInputPanel();
if (input_type_ != kNoneInputType) {
input_method_context_->ShowInputPanel();
}
} else if (method.compare(kHideMethod) == 0) {
input_method_context_->HideInputPanel();
input_method_context_->ResetInputMethodContext();
Expand Down Expand Up @@ -207,7 +210,9 @@ void TextInputChannel::HandleMethodCall(
// The panel should be closed and reopened to fully apply the layout
// change. See https://github.com/flutter-tizen/engine/pull/194.
input_method_context_->HideInputPanel();
input_method_context_->ShowInputPanel();
if (input_type_ != kNoneInputType) {
input_method_context_->ShowInputPanel();
}
}
}

Expand Down

0 comments on commit 3fa9201

Please sign in to comment.