mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 15:54:23 +08:00
FIX: Fix select kit size (#10094)
This commit is contained in:
parent
8cc8e80d7a
commit
aff9bfd5bc
|
@ -800,15 +800,19 @@ export default Component.extend(
|
|||
name: "applySmallScreenMaxWidth",
|
||||
enabled: window.innerWidth <= 450,
|
||||
phase: "beforeWrite",
|
||||
fn({ state }) {
|
||||
fn: ({ state }) => {
|
||||
if (inModal) {
|
||||
const innerModal = document.querySelector(
|
||||
"#discourse-modal div.modal-inner-container"
|
||||
);
|
||||
|
||||
if (innerModal) {
|
||||
state.styles.popper.width = `${innerModal.clientWidth -
|
||||
20}px`;
|
||||
if (this.multiSelect) {
|
||||
state.styles.popper.width = `${this.element.offsetWidth}px`;
|
||||
} else {
|
||||
state.styles.popper.width = `${innerModal.clientWidth -
|
||||
20}px`;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
state.styles.popper.width = `${window.innerWidth - 20}px`;
|
||||
|
|
Loading…
Reference in New Issue
Block a user