소스 검색

LibWeb: Forget frame selection when changing documents

The old selection is obviously not relevant in the new document.
Andreas Kling 4 년 전
부모
커밋
c67b45aa1f
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      Libraries/LibWeb/Page/Frame.cpp

+ 2 - 0
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);