FIX: Chat emoji picker positioning (#28643)

Removes chat-specific changes from dfc947a97d, and adds `preventScroll: true` to prevent timing issues between the emoji picker being brought into the viewport and being focussed.
This commit is contained in:
David Taylor 2024-08-29 17:00:26 +01:00 committed by GitHub
parent 54d6e52607
commit ed4f80d589
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -13,10 +13,6 @@ export default class ChatChannelMessageEmojiPicker extends Component {
context = "chat-channel-message"; context = "chat-channel-message";
listenToBodyScroll = modifier(() => { listenToBodyScroll = modifier(() => {
if (!this.site.mobileView) {
return;
}
const handler = () => { const handler = () => {
this.chatEmojiPickerManager.close(); this.chatEmojiPickerManager.close();
}; };
@ -47,6 +43,10 @@ export default class ChatChannelMessageEmojiPicker extends Component {
{ {
placement: "top", placement: "top",
modifiers: [ modifiers: [
{
name: "eventListeners",
options: { scroll: false, resize: false },
},
{ {
name: "flip", name: "flip",
options: { padding: { top: headerOffset() } }, options: { padding: { top: headerOffset() } },

View File

@ -215,7 +215,7 @@ export default class ChatEmojiPicker extends Component {
@action @action
focusFilter(target) { focusFilter(target) {
schedule("afterRender", () => { schedule("afterRender", () => {
target?.focus(); target?.focus({ preventScroll: true });
}); });
} }