Browse Source

Merge pull request #7003 from brave/exit-tab-fullscreen

exit tab fullscreen on destroy
Cheng Zhao 8 years ago
parent
commit
b5dec9990e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      atom/browser/api/atom_api_web_contents.cc

+ 2 - 0
atom/browser/api/atom_api_web_contents.cc

@@ -775,6 +775,8 @@ bool WebContents::OnMessageReceived(const IPC::Message& message) {
 // be destroyed on close, and WebContentsDestroyed would be called for it, so
 // we need to make sure the api::WebContents is also deleted.
 void WebContents::WebContentsDestroyed() {
+  // clear out tab fullscreen state
+  ExitFullscreenModeForTab(web_contents());
   // This event is only for internal use, which is emitted when WebContents is
   // being destroyed.
   Emit("will-destroy");