few textfield improvements

This commit is contained in:
LionTion committed 2026-10-23 22:58:01 +02:00
1 parent 0e65b8c446
commit 15ce86d6f3
3 files changed
+20 -2

No files matched your search

+18 -1
View File
@@ -26,6 +26,7 @@ export default function Main() {
useEffect(() => { useEffect(() => {
if (!hasAttachedListerner && step > 0) { if (!hasAttachedListerner && step > 0) {
setHasAttachedListener(true);
const doFullscreen = () => { const doFullscreen = () => {
if (screenfull.isEnabled) { if (screenfull.isEnabled) {
screenfull.request(); screenfull.request();
@@ -34,7 +35,23 @@ export default function Main() {
window.addEventListener("click", () => { window.addEventListener("click", () => {
doFullscreen(); doFullscreen();
}); });
setHasAttachedListener(true); if (window.visualViewport) {
const handleResize = () => {
const keyboardHeight = window.innerHeight - window.visualViewport.height;
const appContainer = document.querySelector('#app');
if (appContainer) {
appContainer.style.paddingBottom = keyboardHeight > 0 ? `${keyboardHeight}px` : '0px';
}
if (document.activeElement && keyboardHeight > 0) {
document.activeElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
};
window.visualViewport.addEventListener('resize', handleResize);
window.visualViewport.addEventListener('scroll', handleResize);
}
doFullscreen(); doFullscreen();
} }
}, [step, hasAttachedListerner, setHasAttachedListener]); }, [step, hasAttachedListerner, setHasAttachedListener]);
+1
View File
@@ -14,6 +14,7 @@
.content { .content {
height: 100%; height: 100%;
max-height: 50dvh; max-height: 50dvh;
padding-bottom: 15dvh;
p { p {
font-size: 1.3rem; font-size: 1.3rem;
margin-bottom: 1rem; margin-bottom: 1rem;
+1 -1
View File
@@ -16,4 +16,4 @@ const isDev = process.env.NODE_ENV === "development";
export const HTTP_SCHEME = isDev ? "http" : "https"; export const HTTP_SCHEME = isDev ? "http" : "https";
export const WS_SCHEME = isDev ? "ws" : "wss"; export const WS_SCHEME = isDev ? "ws" : "wss";
export const API_PREFIX = isDev ? "10.8.0.23:8080" : "api.excaliburs-erben.de"; export const API_PREFIX = isDev ? "192.168.0.110:8080" : "api.excaliburs-erben.de";