Upload folder using huggingface_hub
Browse files- client/public/rebuild-nonce.txt +1 -1
- client/src/index.css +6 -15
- client/src/index.tsx +9 -10
client/public/rebuild-nonce.txt
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
Rebuild nonce: 2025-10-25T17:
|
|
|
|
| 1 |
+
Rebuild nonce: 2025-10-25T17:45:28Z
|
client/src/index.css
CHANGED
|
@@ -18,30 +18,21 @@
|
|
| 18 |
/* Safari-specific fixes for layout jumping */
|
| 19 |
@supports (-webkit-appearance: none) {
|
| 20 |
.safari-stable-form {
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
will-change: auto;
|
| 24 |
-
contain: layout style;
|
| 25 |
-
transform: translateZ(0);
|
| 26 |
-
backface-visibility: hidden;
|
| 27 |
}
|
| 28 |
|
| 29 |
.safari-stable-form select,
|
| 30 |
.safari-stable-form textarea {
|
| 31 |
-
|
| 32 |
-
-
|
| 33 |
-
/* Safari jumping fix - float left prevents focus shift */
|
| 34 |
-
float: left;
|
| 35 |
-
clear: none;
|
| 36 |
}
|
| 37 |
|
| 38 |
/* Prevent Safari jumping on form focus */
|
| 39 |
.safari-stable-form select:focus,
|
| 40 |
.safari-stable-form textarea:focus {
|
| 41 |
-
|
| 42 |
-
-
|
| 43 |
-
transform: translateZ(0);
|
| 44 |
-
backface-visibility: hidden;
|
| 45 |
}
|
| 46 |
}
|
| 47 |
|
|
|
|
| 18 |
/* Safari-specific fixes for layout jumping */
|
| 19 |
@supports (-webkit-appearance: none) {
|
| 20 |
.safari-stable-form {
|
| 21 |
+
position: relative;
|
| 22 |
+
isolation: isolate;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
.safari-stable-form select,
|
| 26 |
.safari-stable-form textarea {
|
| 27 |
+
position: relative;
|
| 28 |
+
z-index: 1;
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
/* Prevent Safari jumping on form focus */
|
| 32 |
.safari-stable-form select:focus,
|
| 33 |
.safari-stable-form textarea:focus {
|
| 34 |
+
position: relative;
|
| 35 |
+
z-index: 1;
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
}
|
| 38 |
|
client/src/index.tsx
CHANGED
|
@@ -20,28 +20,27 @@ import App from './App';
|
|
| 20 |
} catch {}
|
| 21 |
})();
|
| 22 |
|
| 23 |
-
// Safari jumping fix - prevent
|
| 24 |
(() => {
|
| 25 |
try {
|
| 26 |
const ua = navigator.userAgent;
|
| 27 |
const isSafari = /^((?!chrome|android).)*safari/i.test(ua);
|
| 28 |
if (isSafari) {
|
| 29 |
-
// Prevent Safari from jumping on form
|
| 30 |
const preventSafariJump = (e: Event) => {
|
| 31 |
const target = e.target as HTMLElement;
|
| 32 |
if (target && (target.tagName === 'SELECT' || target.tagName === 'TEXTAREA')) {
|
| 33 |
-
//
|
| 34 |
-
|
|
|
|
| 35 |
|
| 36 |
-
//
|
| 37 |
-
|
| 38 |
-
window.scrollTo(0, scrollY);
|
| 39 |
-
});
|
| 40 |
}
|
| 41 |
};
|
| 42 |
|
| 43 |
-
// Listen for
|
| 44 |
-
document.addEventListener('
|
| 45 |
}
|
| 46 |
} catch {}
|
| 47 |
})();
|
|
|
|
| 20 |
} catch {}
|
| 21 |
})();
|
| 22 |
|
| 23 |
+
// Safari jumping fix - prevent focus events from causing layout shifts
|
| 24 |
(() => {
|
| 25 |
try {
|
| 26 |
const ua = navigator.userAgent;
|
| 27 |
const isSafari = /^((?!chrome|android).)*safari/i.test(ua);
|
| 28 |
if (isSafari) {
|
| 29 |
+
// Prevent Safari from jumping on form interactions
|
| 30 |
const preventSafariJump = (e: Event) => {
|
| 31 |
const target = e.target as HTMLElement;
|
| 32 |
if (target && (target.tagName === 'SELECT' || target.tagName === 'TEXTAREA')) {
|
| 33 |
+
// Prevent default behavior that causes jumping
|
| 34 |
+
e.preventDefault();
|
| 35 |
+
e.stopPropagation();
|
| 36 |
|
| 37 |
+
// Manually focus the element
|
| 38 |
+
target.focus();
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
};
|
| 41 |
|
| 42 |
+
// Listen for mousedown events to intercept before focus
|
| 43 |
+
document.addEventListener('mousedown', preventSafariJump, { passive: false });
|
| 44 |
}
|
| 45 |
} catch {}
|
| 46 |
})();
|