linguabot commited on
Commit
6df9e3c
·
verified ·
1 Parent(s): 93d58f0

Upload folder using huggingface_hub

Browse files
client/public/rebuild-nonce.txt CHANGED
@@ -1 +1 @@
1
- Rebuild nonce: 2025-10-25T17:35:42Z
 
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
- -webkit-transform: translateZ(0);
22
- -webkit-backface-visibility: hidden;
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
- -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 */
39
  .safari-stable-form select:focus,
40
  .safari-stable-form textarea:focus {
41
- -webkit-transform: translateZ(0);
42
- -webkit-backface-visibility: hidden;
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 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
  })();
 
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
  })();