PERF: do not cancel debounce and prevents popper on scroll (#19280)
This commit also replaces deprecated `mousewheel` by `wheel` event listener
This commit is contained in:
parent
0ce38bd7bc
commit
630bde1ba2
|
@ -99,7 +99,7 @@ export default Component.extend({
|
|||
passive: true,
|
||||
});
|
||||
window.addEventListener("resize", this.onResizeHandler);
|
||||
window.addEventListener("mousewheel", this.onScrollHandler, {
|
||||
window.addEventListener("wheel", this.onScrollHandler, {
|
||||
passive: true,
|
||||
});
|
||||
|
||||
|
@ -124,7 +124,7 @@ export default Component.extend({
|
|||
?.removeEventListener("scroll", this.onScrollHandler);
|
||||
|
||||
window.removeEventListener("resize", this.onResizeHandler);
|
||||
window.removeEventListener("mousewheel", this.onScrollHandler);
|
||||
window.removeEventListener("wheel", this.onScrollHandler);
|
||||
|
||||
this.appEvents.off(
|
||||
"chat-live-pane:highlight-message",
|
||||
|
@ -1320,8 +1320,6 @@ export default Component.extend({
|
|||
|
||||
@action
|
||||
onHoverMessage(message, options = {}, event) {
|
||||
cancel(this._onHoverMessageDebouncedHandler);
|
||||
|
||||
if (this.site.mobileView && options.desktopOnly) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,12 @@ export default Component.extend({
|
|||
placement: "right-start",
|
||||
modifiers: [
|
||||
{ name: "hide", enabled: true },
|
||||
{
|
||||
name: "eventListeners",
|
||||
options: {
|
||||
scroll: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "offset",
|
||||
options: {
|
||||
|
|
Loading…
Reference in New Issue