FIX: in modal should check for body (#22642)

To decide to use flip behavior select-kit will check if it's located inside a modal as a modal will scroll if overflown, however, when locating the select-kit element in the footer or header this is not the case. This commit will deactivate `flip` modifier only when used inside modal body.
This commit is contained in:
Joffrey JAFFEUX 2023-07-17 17:39:01 +02:00 committed by GitHub
parent 3bde7ae433
commit e214fc38ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -876,7 +876,7 @@ export default Component.extend(
this.selectKit.onOpen(event);
if (!this.popper) {
const inModal = this.element.closest("#discourse-modal");
const inModal = this.element.closest("#discourse-modal .modal-body");
const anchor = document.querySelector(
`#${this.selectKit.uniqueID}-header`
);