mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 00:47:46 -06:00
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:
parent
587264f9d2
commit
ed40c8bfd0
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user