Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support TextInputType.none in TextInputChannel #74

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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