Skip to content

Commit 3fa9201

Browse files
authored
Support TextInputType.none in TextInputChannel (#74)
1 parent b0fd447 commit 3fa9201

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

flutter/shell/platform/tizen/channels/text_input_channel.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ constexpr char kClearClientMethod[] = "TextInput.clearClient";
1919
constexpr char kSetClientMethod[] = "TextInput.setClient";
2020
constexpr char kShowMethod[] = "TextInput.show";
2121
constexpr char kHideMethod[] = "TextInput.hide";
22+
constexpr char kNoneInputType[] = "TextInputType.none";
2223
constexpr char kMultilineInputType[] = "TextInputType.multiline";
2324
constexpr char kUpdateEditingStateMethod[] =
2425
"TextInputClient.updateEditingState";
@@ -132,7 +133,9 @@ void TextInputChannel::HandleMethodCall(
132133
const std::string& method = method_call.method_name();
133134

134135
if (method.compare(kShowMethod) == 0) {
135-
input_method_context_->ShowInputPanel();
136+
if (input_type_ != kNoneInputType) {
137+
input_method_context_->ShowInputPanel();
138+
}
136139
} else if (method.compare(kHideMethod) == 0) {
137140
input_method_context_->HideInputPanel();
138141
input_method_context_->ResetInputMethodContext();
@@ -207,7 +210,9 @@ void TextInputChannel::HandleMethodCall(
207210
// The panel should be closed and reopened to fully apply the layout
208211
// change. See https://github.com/flutter-tizen/engine/pull/194.
209212
input_method_context_->HideInputPanel();
210-
input_method_context_->ShowInputPanel();
213+
if (input_type_ != kNoneInputType) {
214+
input_method_context_->ShowInputPanel();
215+
}
211216
}
212217
}
213218

0 commit comments

Comments
 (0)