mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: Chat emoji picker positioning (#28643)
Removes chat-specific changes from dfc947a97dd37d5ec58e1c971a9a2285429dd98d, 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:
@ -13,10 +13,6 @@ export default class ChatChannelMessageEmojiPicker extends Component {
|
||||
context = "chat-channel-message";
|
||||
|
||||
listenToBodyScroll = modifier(() => {
|
||||
if (!this.site.mobileView) {
|
||||
return;
|
||||
}
|
||||
|
||||
const handler = () => {
|
||||
this.chatEmojiPickerManager.close();
|
||||
};
|
||||
@ -47,6 +43,10 @@ export default class ChatChannelMessageEmojiPicker extends Component {
|
||||
{
|
||||
placement: "top",
|
||||
modifiers: [
|
||||
{
|
||||
name: "eventListeners",
|
||||
options: { scroll: false, resize: false },
|
||||
},
|
||||
{
|
||||
name: "flip",
|
||||
options: { padding: { top: headerOffset() } },
|
||||
|
@ -215,7 +215,7 @@ export default class ChatEmojiPicker extends Component {
|
||||
@action
|
||||
focusFilter(target) {
|
||||
schedule("afterRender", () => {
|
||||
target?.focus();
|
||||
target?.focus({ preventScroll: true });
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user