diff --git a/app/assets/javascripts/discourse/app/components/emoji-picker/content.gjs b/app/assets/javascripts/discourse/app/components/emoji-picker/content.gjs index e1f2e9f9582..ae5a394c256 100644 --- a/app/assets/javascripts/discourse/app/components/emoji-picker/content.gjs +++ b/app/assets/javascripts/discourse/app/components/emoji-picker/content.gjs @@ -336,7 +336,7 @@ export default class EmojiPicker extends Component { const targetEmoji = document.querySelector( `.emoji-picker__section[data-section="${section}"]` ); - targetEmoji.scrollIntoView({ block: "start" }); + targetEmoji.scrollIntoView({ block: "nearest" }); // iOS hack to avoid blank div when requesting section during momentum if (this.scrollableNode && this.capabilities.isIOS) { @@ -473,27 +473,29 @@ export default class EmojiPicker extends Component {
{{#each-in this.groups as |section emojis|}} - - {{#if (eq section "favorites")}} - {{replaceEmoji ":star:"}} - {{else}} - - {{/if}} - + {{#if emojis.length}} + + {{#if (eq section "favorites")}} + {{replaceEmoji ":star:"}} + {{else}} + + {{/if}} + + {{/if}} {{/each-in}}
diff --git a/app/assets/javascripts/discourse/app/components/emoji-picker/index.gjs b/app/assets/javascripts/discourse/app/components/emoji-picker/index.gjs index f3da70e563e..07429aef4dd 100644 --- a/app/assets/javascripts/discourse/app/components/emoji-picker/index.gjs +++ b/app/assets/javascripts/discourse/app/components/emoji-picker/index.gjs @@ -21,6 +21,10 @@ export default class EmojiPicker extends Component { return this.args.context ?? "topic"; } + get modalForMobile() { + return this.args.modalForMobile ?? true; + } +