Fix restoring scroll position on pop

This commit is contained in:
Luke Street
2026-05-01 17:40:38 -06:00
parent fb1b260d09
commit 4c09d8b910
+1 -1
View File
@@ -36,7 +36,7 @@ Document::~Document() {
void Document::show() {
if (mDocument != nullptr) {
// Attempt to preserve the previously focused element
mDocument->Show(Rml::ModalFlag::None, Rml::FocusFlag::Keep);
mDocument->Show(Rml::ModalFlag::None, Rml::FocusFlag::Keep, Rml::ScrollFlag::None);
// If nothing is focused, let the document decide the initial focus
auto* leaf = mDocument->GetFocusLeafNode();
if (leaf == nullptr || leaf == mDocument) {