mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
parent
54d6e52607
commit
ed4f80d589
@ -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() } },
|
||||||
|
@ -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 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user