1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 17:25:07 +00:00

LibWeb: Forget frame selection when changing documents

The old selection is obviously not relevant in the new document.
This commit is contained in:
Andreas Kling 2020-10-22 23:23:57 +02:00
parent 8de743a878
commit c67b45aa1f

View file

@ -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);