From 705ab497f2d67c5593cfcc89fc1a4d6c9cfe713f Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 23 Jan 2016 09:20:53 -0800 Subject: [PATCH] UI: Oops, use tag for focus too. --- ext/native/ui/view.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/native/ui/view.cpp b/ext/native/ui/view.cpp index 68a9304936..32ba78ae7f 100644 --- a/ext/native/ui/view.cpp +++ b/ext/native/ui/view.cpp @@ -166,7 +166,12 @@ std::string View::Describe() const { void View::PersistData(PersistStatus status, std::string anonId, PersistMap &storage) { // Remember if this view was a focused view. - const std::string focusedKey = "ViewFocused::" + anonId; + std::string tag = Tag(); + if (tag.empty()) { + tag = anonId; + } + + const std::string focusedKey = "ViewFocused::" + tag; switch (status) { case UI::PERSIST_SAVE: if (HasFocus()) {