mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -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 { getMaxAnimationTimeMs } from "discourse/lib/swipe-events";
|
||||||
import swipe from "discourse/modifiers/swipe";
|
import swipe from "discourse/modifiers/swipe";
|
||||||
import trapTab from "discourse/modifiers/trap-tab";
|
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_BUTTON = "initiatedByCloseButton";
|
||||||
export const CLOSE_INITIATED_BY_ESC = "initiatedByESC";
|
export const CLOSE_INITIATED_BY_ESC = "initiatedByESC";
|
||||||
@ -60,11 +59,6 @@ export default class DModal extends Component {
|
|||||||
this.handleDocumentKeydown
|
this.handleDocumentKeydown
|
||||||
);
|
);
|
||||||
|
|
||||||
this.appEvents.on(
|
|
||||||
"keyboard-visibility-change",
|
|
||||||
this.handleKeyboardVisibilityChange
|
|
||||||
);
|
|
||||||
|
|
||||||
if (this.site.mobileView) {
|
if (this.site.mobileView) {
|
||||||
this.animating = true;
|
this.animating = true;
|
||||||
|
|
||||||
@ -89,11 +83,6 @@ export default class DModal extends Component {
|
|||||||
"keydown",
|
"keydown",
|
||||||
this.handleDocumentKeydown
|
this.handleDocumentKeydown
|
||||||
);
|
);
|
||||||
|
|
||||||
this.appEvents.off(
|
|
||||||
"keyboard-visibility-change",
|
|
||||||
this.handleKeyboardVisibilityChange
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get dismissable() {
|
get dismissable() {
|
||||||
@ -220,13 +209,6 @@ export default class DModal extends Component {
|
|||||||
return element(tagName);
|
return element(tagName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@bind
|
|
||||||
handleKeyboardVisibilityChange(visible) {
|
|
||||||
if (visible) {
|
|
||||||
window.scrollTo(0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#animateBackdropOpacity(position) {
|
#animateBackdropOpacity(position) {
|
||||||
const backdrop = this.wrapperElement.nextElementSibling;
|
const backdrop = this.wrapperElement.nextElementSibling;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user