Upload folder using huggingface_hub
Browse files- client/public/rebuild-nonce.txt +1 -1
- client/src/index.css +3 -0
- client/src/index.tsx +26 -0
client/public/rebuild-nonce.txt
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
Rebuild nonce: 2025-10-25T17:
|
|
|
|
| 1 |
+
Rebuild nonce: 2025-10-25T17:35:42Z
|
client/src/index.css
CHANGED
|
@@ -30,6 +30,9 @@
|
|
| 30 |
.safari-stable-form textarea {
|
| 31 |
-webkit-transform: translateZ(0);
|
| 32 |
-webkit-backface-visibility: hidden;
|
|
|
|
|
|
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
/* Prevent Safari jumping on form focus */
|
|
|
|
| 30 |
.safari-stable-form textarea {
|
| 31 |
-webkit-transform: translateZ(0);
|
| 32 |
-webkit-backface-visibility: hidden;
|
| 33 |
+
/* Safari jumping fix - float left prevents focus shift */
|
| 34 |
+
float: left;
|
| 35 |
+
clear: none;
|
| 36 |
}
|
| 37 |
|
| 38 |
/* Prevent Safari jumping on form focus */
|
client/src/index.tsx
CHANGED
|
@@ -20,6 +20,32 @@ import App from './App';
|
|
| 20 |
} catch {}
|
| 21 |
})();
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
const root = ReactDOM.createRoot(
|
| 24 |
document.getElementById('root') as HTMLElement
|
| 25 |
);
|
|
|
|
| 20 |
} catch {}
|
| 21 |
})();
|
| 22 |
|
| 23 |
+
// Safari jumping fix - prevent default focus behavior that causes 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 focus
|
| 30 |
+
const preventSafariJump = (e: Event) => {
|
| 31 |
+
const target = e.target as HTMLElement;
|
| 32 |
+
if (target && (target.tagName === 'SELECT' || target.tagName === 'TEXTAREA')) {
|
| 33 |
+
// Store current scroll position
|
| 34 |
+
const scrollY = window.scrollY;
|
| 35 |
+
|
| 36 |
+
// Use requestAnimationFrame to restore position after Safari's layout recalculation
|
| 37 |
+
requestAnimationFrame(() => {
|
| 38 |
+
window.scrollTo(0, scrollY);
|
| 39 |
+
});
|
| 40 |
+
}
|
| 41 |
+
};
|
| 42 |
+
|
| 43 |
+
// Listen for focus events on form elements
|
| 44 |
+
document.addEventListener('focusin', preventSafariJump, { passive: true });
|
| 45 |
+
}
|
| 46 |
+
} catch {}
|
| 47 |
+
})();
|
| 48 |
+
|
| 49 |
const root = ReactDOM.createRoot(
|
| 50 |
document.getElementById('root') as HTMLElement
|
| 51 |
);
|