diff options
author | budaim <budabudimir.bb@gmail.com> | 2017-06-14 16:17:57 +0200 |
---|---|---|
committer | budaim <budabudimir.bb@gmail.com> | 2017-06-14 17:06:11 +0200 |
commit | 11fb9db7bfdcf0e2a5b5a3b6fe2e257549b20c96 (patch) | |
tree | cadf50396fd296ab4e204fe16fe15cf21f2b2288 /components/script/script_thread.rs | |
parent | 5dce166266d1f74e2ae88dbe52ca5ced75c2349b (diff) | |
download | servo-11fb9db7bfdcf0e2a5b5a3b6fe2e257549b20c96.tar.gz servo-11fb9db7bfdcf0e2a5b5a3b6fe2e257549b20c96.zip |
Fixing issue #16057
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index fcb351cebb2..2e7d3bfebc0 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1652,6 +1652,13 @@ impl ScriptThread { let load = self.incomplete_loads.borrow_mut().remove(idx); load.layout_chan.clone() } else if let Some(document) = self.documents.borrow_mut().remove(id) { + // We don't want to dispatch `mouseout` event pointing to non-existing element + if let Some(target) = self.topmost_mouse_over_target.get() { + if target.upcast::<Node>().owner_doc() == document { + self.topmost_mouse_over_target.set(None); + } + } + let window = document.window(); if discard_bc == DiscardBrowsingContext::Yes { window.window_proxy().discard_browsing_context(); |