FIX: A select-kit+modal regression (#22961)

Regressed in https://github.com/discourse/discourse/pull/22642

`inModal` var is `.modal-body` itself now, so the changing the modal height failed.
This commit is contained in:
Jarek Radosz 2023-08-03 20:00:07 +02:00 committed by GitHub
parent 35ff57ba69
commit 999aaa35a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -988,10 +988,9 @@ export default Component.extend(
enabled: !!(inModal && this.site.mobileView),
phase: "afterWrite",
fn: ({ state }) => {
const modalBody = inModal.querySelector(".modal-body");
modalBody.style = "";
modalBody.style.height =
modalBody.clientHeight + state.rects.popper.height + "px";
inModal.style = "";
inModal.style.height =
inModal.clientHeight + state.rects.popper.height + "px";
},
},
],