mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 04:38:52 +08:00
FIX: removes mousewheel edge case on messages (#30900)
This commit is contained in:
@ -1,7 +1,6 @@
|
|||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import { tracked } from "@glimmer/tracking";
|
import { tracked } from "@glimmer/tracking";
|
||||||
import { concat, hash } from "@ember/helper";
|
import { concat, hash } from "@ember/helper";
|
||||||
import { on } from "@ember/modifier";
|
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
import { getOwner } from "@ember/owner";
|
import { getOwner } from "@ember/owner";
|
||||||
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
|
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
|
||||||
@ -62,12 +61,6 @@ export default class ChatMessageActionsDesktop extends Component {
|
|||||||
this.messageInteractor.openEmojiPicker(event.target);
|
this.messageInteractor.openEmojiPicker(event.target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
|
||||||
onWheel() {
|
|
||||||
// prevents menu to stop scroll on the list of messages
|
|
||||||
this.chat.activeMessage = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@action
|
@action
|
||||||
setup(element) {
|
setup(element) {
|
||||||
this.popper?.destroy();
|
this.popper?.destroy();
|
||||||
@ -119,7 +112,6 @@ export default class ChatMessageActionsDesktop extends Component {
|
|||||||
<div
|
<div
|
||||||
{{didInsert this.setup}}
|
{{didInsert this.setup}}
|
||||||
{{didUpdate this.setup this.chat.activeMessage.model.id}}
|
{{didUpdate this.setup this.chat.activeMessage.model.id}}
|
||||||
{{on "wheel" this.onWheel passive=true}}
|
|
||||||
{{willDestroy this.teardown}}
|
{{willDestroy this.teardown}}
|
||||||
class={{concatClass
|
class={{concatClass
|
||||||
"chat-message-actions-container"
|
"chat-message-actions-container"
|
||||||
|
Reference in New Issue
Block a user