Skip to content

Commit

Permalink
fix: Don't permanently hide tabs if you close the window while filter…
Browse files Browse the repository at this point in the history
…ing.

Call `clearFind` on individual window close events.

Fixes #1015.
Merge pull request #1037 from ericawright/clearFind.
  • Loading branch information
bwinton authored Mar 30, 2017
2 parents bf9fb96 + 5f6d562 commit 4f2d106
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,13 @@ exports.main = function (options, callbacks) {
// Override default preferences
utils.setDefaultPrefs();

browserWindows.on('close', function (window) {
let win = viewFor(window);
if (win.VerticalTabs) {
win.VerticalTabs.clearFind();
}
});

// Startup VerticalTabs object for each window.
for (let window of browserWindows) {
//cause no disruption to users when changing the way we handle
Expand Down Expand Up @@ -581,7 +588,10 @@ exports.main = function (options, callbacks) {

exports.onUnload = function (reason) {
for (let window of browserWindows) {
viewFor(window).VerticalTabs.clearFind();
let win = viewFor(window);
if (win.VerticalTabs) {
win.VerticalTabs.clearFind();
}
}

// If the app is shutting down, skip the rest
Expand Down

0 comments on commit 4f2d106

Please sign in to comment.