FIX: remove redundant body scroll lock (#29395)
PR #26784 adds the scroll lock in the modal which renders this second scroll lock for SK component redundant. Having it there in fact causes issues on iPads, where it isn't necessary.
This commit is contained in:
parent
d80dcaa261
commit
9b1c6f8384
|
@ -1,11 +1,5 @@
|
|||
{{#if this.collection.content.length}}
|
||||
<ul
|
||||
class="select-kit-collection"
|
||||
aria-live="polite"
|
||||
role="menu"
|
||||
{{did-insert this.lock}}
|
||||
{{will-destroy this.unlock}}
|
||||
>
|
||||
<ul class="select-kit-collection" aria-live="polite" role="menu">
|
||||
{{#each this.collection.content as |item index|}}
|
||||
{{component
|
||||
(component-for-row this.collection.identifier item this.selectKit)
|
||||
|
|
|
@ -1,31 +1,5 @@
|
|||
import { cached } from "@glimmer/tracking";
|
||||
import Component from "@ember/component";
|
||||
import { action } from "@ember/object";
|
||||
import { tagName } from "@ember-decorators/component";
|
||||
import {
|
||||
disableBodyScroll,
|
||||
enableBodyScroll,
|
||||
} from "discourse/lib/body-scroll-lock";
|
||||
|
||||
@tagName("")
|
||||
export default class SelectKitCollection extends Component {
|
||||
@cached
|
||||
get inModal() {
|
||||
const element = this.selectKit.mainElement();
|
||||
return element.closest(".d-modal");
|
||||
}
|
||||
|
||||
@action
|
||||
lock(element) {
|
||||
if (!this.inModal) {
|
||||
return;
|
||||
}
|
||||
|
||||
disableBodyScroll(element);
|
||||
}
|
||||
|
||||
@action
|
||||
unlock(element) {
|
||||
enableBodyScroll(element);
|
||||
}
|
||||
}
|
||||
export default class SelectKitCollection extends Component {}
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
.d-modal.add-pm-participants {
|
||||
.d-modal__body {
|
||||
overflow-y: visible;
|
||||
}
|
||||
}
|
||||
|
||||
.add-pm-participants.modal .share.modal-panel {
|
||||
.header {
|
||||
display: flex;
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.d-modal.add-pm-participants {
|
||||
.d-modal__body {
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
|
||||
.d-modal.bookmark-reminder-modal {
|
||||
.d-modal__container {
|
||||
min-height: calc(var(--composer-vh, var(--1dvh)) * 85);
|
||||
|
|
Loading…
Reference in New Issue