mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 15:55:55 +02:00
Fix Android crash when swiping back with modal open (#90)
This commit is contained in:
@@ -361,6 +361,16 @@
|
|||||||
navFromPopstate = false;
|
navFromPopstate = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// If a modal is open, close it instead of navigating
|
||||||
|
if ($showSettings || $showInfo || $showSearch || $showCommandPalette) {
|
||||||
|
$showSettings = false;
|
||||||
|
$showInfo = false;
|
||||||
|
$showSearch = false;
|
||||||
|
$showCommandPalette = false;
|
||||||
|
// Re-push the current state so the next back still works
|
||||||
|
history.pushState({ mobileView: $mobileView, depth: historyDepth }, '');
|
||||||
|
return;
|
||||||
|
}
|
||||||
const state = e.state;
|
const state = e.state;
|
||||||
const targetDepth = state?.depth ?? 0;
|
const targetDepth = state?.depth ?? 0;
|
||||||
historyDepth = targetDepth;
|
historyDepth = targetDepth;
|
||||||
|
|||||||
Reference in New Issue
Block a user