Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
- this is a fix for adobe/brackets#7752
Browse files Browse the repository at this point in the history
  • Loading branch information
ingorichter committed May 30, 2014
1 parent c5cd588 commit 4d489ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion appshell/client_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,13 @@ void ClientHandler::SendOpenFileCommand(CefRefPtr<CefBrowser> browser, const Cef
std::string fileArrayStr(fileArray);
// FIXME: Use SendJSCommand once it supports parameters
std::string cmd = "require('command/CommandManager').execute('file.openDroppedFiles'," + fileArrayStr + ")";
browser->GetMainFrame()->ExecuteJavaScript(CefString(cmd.c_str()),

// if files are droppend and the Open Dialog is visible, then browser is NULL
// This fixes https://github.com/adobe/brackets/issues/7752
if (browser) {
browser->GetMainFrame()->ExecuteJavaScript(CefString(cmd.c_str()),
browser->GetMainFrame()->GetURL(), 0);
}
}

void ClientHandler::DispatchCloseToNextBrowser()
Expand Down

0 comments on commit 4d489ce

Please sign in to comment.