summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Page
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-10-22 23:23:57 +0200
committerAndreas Kling <kling@serenityos.org>2020-10-22 23:23:57 +0200
commitc67b45aa1f52d11d005c27be74c16e7d08c643dc (patch)
tree2d15beac058fac0c1ec524b130b64439f927bb89 /Libraries/LibWeb/Page
parent8de743a878dcee9e7fec9a9b8993bf06bccde43f (diff)
downloadserenity-c67b45aa1f52d11d005c27be74c16e7d08c643dc.zip
LibWeb: Forget frame selection when changing documents
The old selection is obviously not relevant in the new document.
Diffstat (limited to 'Libraries/LibWeb/Page')
-rw-r--r--Libraries/LibWeb/Page/Frame.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Page/Frame.cpp b/Libraries/LibWeb/Page/Frame.cpp
index cb4bbf4613..fafc0d0f93 100644
--- a/Libraries/LibWeb/Page/Frame.cpp
+++ b/Libraries/LibWeb/Page/Frame.cpp
@@ -80,6 +80,8 @@ void Frame::set_document(DOM::Document* document)
if (m_document == document)
return;
+ m_cursor_position = {};
+
if (m_document)
m_document->detach_from_frame({}, *this);