Skip to content

Commit 5840528

Browse files
committed
Fix bug when ecore wl2 call autofill
1 parent 6b0a2d8 commit 5840528

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ class TextInputChannel {
8383

8484
std::string autofill_id_;
8585

86+
// Hints for request autofill. See availabel options:
87+
// https://api.flutter.dev/flutter/services/AutofillHints-class.html
8688
std::vector<std::string> autofill_hints_;
8789
};
8890

flutter/shell/platform/tizen/tizen_autofill.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ class TizenAutofill {
4646

4747
void OnCommit(std::string str) { commit_callback_(str); }
4848

49-
void CallPopupCallback() {
50-
popup_callback_();
51-
// response_items_.clear();
52-
// TODO : reponse_item_ must be cleared when popup is disappeared
53-
}
49+
void CallPopupCallback() { popup_callback_(); }
5450

5551
const std::vector<std::unique_ptr<AutofillItem>>& GetAutofillItems() {
5652
return response_items_;

flutter/shell/platform/tizen/tizen_input_method_context.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,14 @@ class TizenInputMethodContext {
8383
void SetOnPreeditEnd(OnPreeditEnd callback) { on_preedit_end_ = callback; }
8484

8585
void SetOnPopupAutofillContext(OnPopupAutofillContext callback) {
86-
popup_autofill_context_ = callback;
86+
on_popup_autofill_context_ = callback;
8787
}
8888

89-
void PopupAutofillItems() { popup_autofill_context_(); }
89+
void PopupAutofillItems() {
90+
if (on_popup_autofill_context_) {
91+
on_popup_autofill_context_();
92+
}
93+
}
9094

9195
private:
9296
void RegisterEventCallbacks();
@@ -103,7 +107,7 @@ class TizenInputMethodContext {
103107
OnPreeditChanged on_preedit_changed_;
104108
OnPreeditStart on_preedit_start_;
105109
OnPreeditEnd on_preedit_end_;
106-
OnPopupAutofillContext popup_autofill_context_;
110+
OnPopupAutofillContext on_popup_autofill_context_;
107111
std::unordered_map<Ecore_IMF_Callback_Type, Ecore_IMF_Event_Cb>
108112
event_callbacks_;
109113
};

0 commit comments

Comments
 (0)