WebContents without owner window should always open detached devtools
authorCheng Zhao <zcbenz@gmail.com>
Tue, 17 May 2016 13:39:18 +0000 (22:39 +0900)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 18 May 2016 04:57:48 +0000 (13:57 +0900)
atom/browser/api/atom_api_web_contents.cc

index 8e4653b..4cfbe60 100644 (file)
@@ -866,7 +866,7 @@ void WebContents::OpenDevTools(mate::Arguments* args) {
     return;
 
   std::string state;
-  if (type_ == WEB_VIEW) {
+  if (type_ == WEB_VIEW || !owner_window()) {
     state = "detach";
   } else if (args && args->Length() == 1) {
     bool detach = false;