* Electron version: 1.4.15 (probably older versions too).
* Operating system: macOS 10.12.2

When Quick Look is launched by right-clicking a file in a file dialog, clicking its close button doesn't work (and there's an audible beep), and after enough clicking around frequently it crashes. I suspect the same thing would happen using `dialog.showOpenDialog` presented as a sheet, but I haven't tested.

Minimal app to reproduce:
```js
const {app, BrowserWindow} = require('electron')

app.on('ready', () => {
  const win = new BrowserWindow({width: 300, height: 100})
  win.loadURL('data:text/html,<input type="file">')
})
```

Example:
![quicklook](https://cloud.githubusercontent.com/assets/5355/22160125/06120964-df12-11e6-86db-996f2233bf5e.gif)

Crash log: https://gist.github.com/javan/4c19dddd73b0581e60f6baf3b75d4dd8
atom/browser/web_dialog_helper.cc
#include "atom/browser/web_dialog_helper.h"
#include <string>
#include <vector>
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/native_window.h"
#include "atom/browser/ui/file_dialog.h"
#include "base/bind.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/file_chooser_file_info.h"
#include "content/public/common/file_chooser_params.h"
#include "net/base/mime_util.h"
#include "ui/shell_dialogs/selected_file_info.h"
namespace {
file_dialog::Filters GetFileTypesFromAcceptType(
    const std::vector<base::string16>& accept_types) {
  file_dialog::Filters filters;
  if (accept_types.empty())
    return filters;
  std::vector<base::FilePath::StringType> extensions;