mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 04:18:23 +00:00
UX: fills picker with emoji autocomplete state on more
click (#7466)
This commit is contained in:
parent
6fdbf15d6b
commit
ae493f4722
@ -426,11 +426,18 @@ export default Ember.Component.extend({
|
|||||||
return `${v.code}:`;
|
return `${v.code}:`;
|
||||||
} else {
|
} else {
|
||||||
$editorInput.autocomplete({ cancel: true });
|
$editorInput.autocomplete({ cancel: true });
|
||||||
this.set(
|
this.setProperties({
|
||||||
"isEditorFocused",
|
isEditorFocused: $("textarea.d-editor-input").is(":focus"),
|
||||||
$("textarea.d-editor-input").is(":focus")
|
emojiPickerIsActive: true
|
||||||
);
|
});
|
||||||
this.set("emojiPickerIsActive", true);
|
|
||||||
|
Ember.run.schedule("afterRender", () => {
|
||||||
|
const filterInput = document.querySelector(
|
||||||
|
".emoji-picker input[name='filter']"
|
||||||
|
);
|
||||||
|
if (filterInput) filterInput.value = v.term;
|
||||||
|
});
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -477,7 +484,7 @@ export default Ember.Component.extend({
|
|||||||
)
|
)
|
||||||
.then(list => {
|
.then(list => {
|
||||||
if (list.length) {
|
if (list.length) {
|
||||||
list.push({ label: I18n.t("composer.more_emoji") });
|
list.push({ label: I18n.t("composer.more_emoji"), term });
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user