UX: do not attempt to full width sk on mobile (#9520)

This commit is contained in:
Joffrey JAFFEUX
2020-04-22 20:39:45 +02:00
committed by GitHub
parent e4a0e0bead
commit 4c248fc5c4
3 changed files with 1 additions and 16 deletions

View File

@@ -813,20 +813,8 @@ export default Component.extend(
`[data-select-kit-id=${this.selectKit.uniqueID}-body]`
);
if (
this.site &&
!this.site.mobileView &&
popper.offsetWidth < anchor.offsetWidth
) {
popper.style.minWidth = `${anchor.offsetWidth}px`;
}
const inModal = $(this.element).parents("#discourse-modal").length;
if (this.site && !this.site.mobileView && inModal) {
popper.style.width = `${anchor.offsetWidth}px`;
}
let placementStrategy = this.selectKit.options.placementStrategy;
if (!placementStrategy) {
placementStrategy = inModal ? "fixed" : "absolute";