diff --git a/apps/meteor/app/emoji/client/lib/EmojiPicker.js b/apps/meteor/app/emoji/client/lib/EmojiPicker.js index 8c5f883dfacf..c318f0e3c8de 100644 --- a/apps/meteor/app/emoji/client/lib/EmojiPicker.js +++ b/apps/meteor/app/emoji/client/lib/EmojiPicker.js @@ -122,10 +122,9 @@ export const EmojiPicker = { this.source.focus(); }, pickEmoji(emoji) { - this.pickCallback(emoji); - this.close(); this.addRecent(emoji); + this.pickCallback(emoji); }, addRecent(_emoji) { const pos = this.recent.indexOf(_emoji); diff --git a/apps/meteor/app/ui-message/client/messageBox/createComposerAPI.ts b/apps/meteor/app/ui-message/client/messageBox/createComposerAPI.ts index fdc422e67279..ce30c5156b7e 100644 --- a/apps/meteor/app/ui-message/client/messageBox/createComposerAPI.ts +++ b/apps/meteor/app/ui-message/client/messageBox/createComposerAPI.ts @@ -39,7 +39,6 @@ export const createComposerAPI = (input: HTMLTextAreaElement, storageID: string) emitter.emit('quotedMessagesUpdate'); }; - input.value = Meteor._localStorage.getItem(storageID) ?? ''; input.addEventListener('input', persist); const release = (): void => { @@ -164,6 +163,8 @@ export const createComposerAPI = (input: HTMLTextAreaElement, storageID: string) setEditing(editing); }; + setText(Meteor._localStorage.getItem(storageID) ?? ''); + return { release, get text(): string { diff --git a/apps/meteor/client/views/room/components/body/composer/LegacyComposer/MessageBox.tsx b/apps/meteor/client/views/room/components/body/composer/LegacyComposer/MessageBox.tsx index 9c55adbcbdee..19b64de79617 100644 --- a/apps/meteor/client/views/room/components/body/composer/LegacyComposer/MessageBox.tsx +++ b/apps/meteor/client/views/room/components/body/composer/LegacyComposer/MessageBox.tsx @@ -240,6 +240,7 @@ export const MessageBox = ({ { const groups = messageBox.actions.get(); const config = { diff --git a/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts b/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts index 2c1293eacac4..771f379663f8 100644 --- a/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts +++ b/apps/meteor/tests/e2e/page-objects/fragments/home-content.ts @@ -143,7 +143,7 @@ export class HomeContent { } async pickEmoji(emoji: string, section = 'icon-people') { - await this.page.locator('role=toolbar[name="Composer Secondary Actions"] role=button[name="Emoji"]').click(); + await this.page.locator('role=toolbar[name="Composer Secondary Actions"] >> role=button[name="Emoji"]').click(); await this.page.locator(`//*[contains(@class, "emoji-picker")]//*[contains(@class, "${section}")]`).click(); await this.page.locator(`//*[contains(@class, "emoji-picker")]//*[contains(@class, "${emoji}")]`).first().click(); }