File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ const SplitFlapDisplay: React.FC<SplitFlapDisplayProps> = ({
3737 if ( isInteractive && isConnected ) {
3838 // Focus the hidden input to show keyboard on mobile
3939 if ( hiddenInputRef . current ) {
40- hiddenInputRef . current . focus ( ) ;
40+ hiddenInputRef . current . focus ( {
41+ preventScroll : true // Prevent page from scrolling when focusing
42+ } ) ;
4143 }
4244
4345 // Call the original onClick handler if provided
@@ -111,11 +113,11 @@ const SplitFlapDisplay: React.FC<SplitFlapDisplayProps> = ({
111113 style = { {
112114 position : 'absolute' ,
113115 opacity : 0 ,
114- height : 1 ,
115- width : 1 ,
116+ height : '100%' , // Make it cover the entire display area
117+ width : '100%' , // Make it cover the entire display area
116118 left : 0 ,
117- bottom : 0 ,
118- pointerEvents : 'none' ,
119+ top : 0 ,
120+ pointerEvents : 'none' , // This allows clicks to pass through to the display
119121 zIndex : - 1
120122 } }
121123 onInput = { handleHiddenInput }
You can’t perform that action at this time.
0 commit comments