Commit 54ffd900 authored by JC Brand's avatar JC Brand

Make sure the emoji picker is focused...

the first time it's opened
parent 45ebc70b
...@@ -283,9 +283,10 @@ export class EmojiDropdown extends BaseDropdown { ...@@ -283,9 +283,10 @@ export class EmojiDropdown extends BaseDropdown {
data-toggle="dropdown" data-toggle="dropdown"
aria-haspopup="true" aria-haspopup="true"
aria-expanded="false"> aria-expanded="false">
<converse-icon class="fa fa-smile " <converse-icon
path-prefix="${api.settings.get('assets_path')}" class="fa fa-smile "
size="1em"></converse-icon> path-prefix="${api.settings.get('assets_path')}"
size="1em"></converse-icon>
</button> </button>
<div class="dropdown-menu"> <div class="dropdown-menu">
${until(this.initModel().then(() => html` ${until(this.initModel().then(() => html`
...@@ -314,14 +315,14 @@ export class EmojiDropdown extends BaseDropdown { ...@@ -314,14 +315,14 @@ export class EmojiDropdown extends BaseDropdown {
} }
async showMenu () { async showMenu () {
await this.init_promise; await this.initModel();
if (!this.render_emojis) { if (!this.render_emojis) {
// Trigger an update so that emojis are rendered // Trigger an update so that emojis are rendered
this.render_emojis = true; this.render_emojis = true;
this.requestUpdate(); await this.requestUpdate();
} }
super.showMenu(); super.showMenu();
this.querySelector('.emoji-search')?.focus(); setTimeout(() => this.querySelector('.emoji-search')?.focus());
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment