Sessions: show export dropdown above bottom tab bar (#31898)
This commit is contained in:
parent
b02a40353f
commit
579df2ad67
1 changed files with 14 additions and 0 deletions
|
|
@ -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<HTMLElement>(".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...");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue