The scroll position of the previous page used to carry over, which on iPad makes the system blur the app bar when content is scrolled under it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7fc5e4b534
commit
bb7b5bd6d8
2 files changed
+22
No files matched your search
@@ -60,6 +60,12 @@ const App = () => {
|
||||
const reader = useBibleReader(currentPage, readerPlanProgress?.translation ?? null);
|
||||
const audio = useAudio(reader.readerBookAbbrev, reader.readerChapter, reader.readerTranslation);
|
||||
useEffect(() => { if (currentPage !== 'reader') setReaderPlan(null); }, [currentPage]);
|
||||
// A new page starts at the top. Without this the scroll position of the previous page carries over, and on
|
||||
// iPad content scrolled under the top edge makes the system blur the app bar.
|
||||
useEffect(() => {
|
||||
const scroller = document.scrollingElement ?? document.documentElement;
|
||||
if (scroller) scroller.scrollTop = 0;
|
||||
}, [currentPage]);
|
||||
// Keep the browser/OS chrome (status bar area, overscroll, scrollbars) in the chosen theme
|
||||
useEffect(() => { applySystemChrome(reader.readerTheme); }, [reader.readerTheme]);
|
||||
const { authUser, setAuthUser, authServerDown, signIn, logout } = useAuth({
|
||||
|
||||
Reference in new issue
Block a user