From c67b45aa1f52d11d005c27be74c16e7d08c643dc Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 22 Oct 2020 23:23:57 +0200 Subject: LibWeb: Forget frame selection when changing documents The old selection is obviously not relevant in the new document. --- Libraries/LibWeb/Page/Frame.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Libraries/LibWeb/Page') 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); -- cgit v1.2.3