FIX: Remove scroll events for mobile modals (#29391)

* FIX: Remove scroll events for mobile modals
This causes some issues with different devices.
We want to test the side effects of removing this.
This commit is contained in:
Jan Cernik 2024-10-24 10:18:51 -03:00 committed by GitHub
parent 587264f9d2
commit ed40c8bfd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,6 @@ import {
import { getMaxAnimationTimeMs } from "discourse/lib/swipe-events";
import swipe from "discourse/modifiers/swipe";
import trapTab from "discourse/modifiers/trap-tab";
import { bind } from "discourse-common/utils/decorators";
export const CLOSE_INITIATED_BY_BUTTON = "initiatedByCloseButton";
export const CLOSE_INITIATED_BY_ESC = "initiatedByESC";
@ -60,11 +59,6 @@ export default class DModal extends Component {
this.handleDocumentKeydown
);
this.appEvents.on(
"keyboard-visibility-change",
this.handleKeyboardVisibilityChange
);
if (this.site.mobileView) {
this.animating = true;
@ -89,11 +83,6 @@ export default class DModal extends Component {
"keydown",
this.handleDocumentKeydown
);
this.appEvents.off(
"keyboard-visibility-change",
this.handleKeyboardVisibilityChange
);
}
get dismissable() {
@ -220,13 +209,6 @@ export default class DModal extends Component {
return element(tagName);
}
@bind
handleKeyboardVisibilityChange(visible) {
if (visible) {
window.scrollTo(0, 0);
}
}
#animateBackdropOpacity(position) {
const backdrop = this.wrapperElement.nextElementSibling;