@@ -75,6 +75,7 @@ const AppScreen: React.FC<AppScreenProps> = ({
7575 const paperRef = useRef < HTMLDivElement > ( null ) ;
7676 const edgeRef = useRef < HTMLDivElement > ( null ) ;
7777 const appBarRef = useRef < HTMLDivElement > ( null ) ;
78+ const paperContentRef = useRef < HTMLDivElement > ( null ) ;
7879
7980 const modalPresentationStyle =
8081 globalOptions . theme === "cupertino"
@@ -201,7 +202,7 @@ const AppScreen: React.FC<AppScreenProps> = ({
201202 appBar ?. onTopClick ?.( e ) ;
202203
203204 if ( ! e . defaultPrevented ) {
204- paperRef . current ?. scroll ( {
205+ paperContentRef . current ?. scroll ( {
205206 top : 0 ,
206207 behavior : "smooth" ,
207208 } ) ;
@@ -217,7 +218,7 @@ const AppScreen: React.FC<AppScreenProps> = ({
217218 value = { useMemo (
218219 ( ) => ( {
219220 scroll ( { top } ) {
220- paperRef ?. current ?. scroll ( {
221+ paperContentRef ?. current ?. scroll ( {
221222 top,
222223 behavior : "smooth" ,
223224 } ) ;
@@ -229,7 +230,7 @@ const AppScreen: React.FC<AppScreenProps> = ({
229230 appBar : zIndexAppBar ,
230231 } ,
231232 } ) ,
232- [ paperRef , zIndexDim , zIndexPaper , zIndexEdge , zIndexAppBar ] ,
233+ [ paperContentRef , zIndexDim , zIndexPaper , zIndexEdge , zIndexAppBar ] ,
233234 ) }
234235 >
235236 < div
@@ -294,7 +295,12 @@ const AppScreen: React.FC<AppScreenProps> = ({
294295 data-part = "paper"
295296 { ...activityDataAttributes }
296297 >
297- < div className = { css . paperContent ( { hasAppBar } ) } > { children } </ div >
298+ < div
299+ ref = { paperContentRef }
300+ className = { css . paperContent ( { hasAppBar } ) }
301+ >
302+ { children }
303+ </ div >
298304 </ div >
299305 { ! activity ?. isRoot &&
300306 globalOptions . theme === "cupertino" &&
0 commit comments