@@ -37,7 +37,7 @@ export const ExperimentalMobileFormattingToolbarController = (props: {
3737
3838 useEffect ( ( ) => {
3939 const el = divRef . current ;
40- if ( ! el ) return ;
40+ if ( ! el ) { return ; }
4141
4242 const setOffset = ( px : number ) => {
4343 el . style . setProperty (
@@ -50,10 +50,10 @@ export const ExperimentalMobileFormattingToolbarController = (props: {
5050
5151 const scrollSelectionIntoView = ( ) => {
5252 const sel = window . getSelection ( ) ;
53- if ( ! sel || sel . rangeCount === 0 ) return ;
53+ if ( ! sel || sel . rangeCount === 0 ) { return ; }
5454 const rect = sel . getRangeAt ( 0 ) . getBoundingClientRect ( ) ;
5555 const vp = window . visualViewport ;
56- if ( ! vp ) return ;
56+ if ( ! vp ) { return ; }
5757 const toolbarHeight = el . getBoundingClientRect ( ) . height || 44 ;
5858 const visibleBottom = vp . offsetTop + vp . height - toolbarHeight ;
5959 if ( rect . bottom > visibleBottom ) {
@@ -90,14 +90,14 @@ export const ExperimentalMobileFormattingToolbarController = (props: {
9090
9191 // Tier 2: Visual Viewport API fallback (Safari iOS, Firefox Android)
9292 const vp = window . visualViewport ;
93- if ( ! vp ) return ;
93+ if ( ! vp ) { return ; }
9494
9595 let lastKnownKeyboardHeight = 0 ;
9696
9797 const update = ( ) => {
9898 const layoutHeight = document . documentElement . clientHeight ;
9999 const keyboardHeight = layoutHeight - vp . height - vp . offsetTop ;
100- if ( keyboardHeight > 50 ) lastKnownKeyboardHeight = keyboardHeight ;
100+ if ( keyboardHeight > 50 ) { lastKnownKeyboardHeight = keyboardHeight ; }
101101 setOffset ( keyboardHeight ) ;
102102 clearTimeout ( scrollTimer ) ;
103103 scrollTimer = setTimeout ( scrollSelectionIntoView , 100 ) ;
0 commit comments