From 579df2ad67398614d563cd3a58e76430f3260ae6 Mon Sep 17 00:00:00 2001 From: andig Date: Sat, 18 Jul 2026 12:06:57 +0200 Subject: [PATCH] Sessions: show export dropdown above bottom tab bar (#31898) --- assets/js/app.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/assets/js/app.ts b/assets/js/app.ts index 0f68c9be8..169870187 100644 --- a/assets/js/app.ts +++ b/assets/js/app.ts @@ -1,5 +1,6 @@ import "bootstrap/dist/css/bootstrap.min.css"; import "../css/app.css"; +import Dropdown from "bootstrap/js/dist/dropdown"; import { createApp, defineComponent, h } from "vue"; import { VueHeadMixin, createHead } from "@unhead/vue/client"; import App from "./views/App.vue"; @@ -11,6 +12,19 @@ import { appDetection, sendToApp } from "./utils/native"; import store from "./store"; import type { Notification } from "./types/evcc"; +// keep dropdown menus out of the fixed bottom tab bar and safe-area inset +Dropdown.Default.popperConfig = (defaultConfig) => { + const bottom = document.querySelector(".bottom-tab-bar")?.offsetHeight ?? 0; + return { + ...defaultConfig, + modifiers: [ + ...(defaultConfig.modifiers ?? []), + { name: "flip", options: { padding: { bottom } } }, + { name: "preventOverflow", options: { padding: { bottom } } }, + ], + }; +}; + // lazy load smoothscroll polyfill. mainly for safari < 15.4 if (!window.CSS.supports("scroll-behavior", "smooth")) { console.log("no native smoothscroll support. polyfilling...");