Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/zen/common/ZenUIManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ var gZenUIManager = {
return true;
},

handleNewTab(werePassedURL, searchClipboard, where) {
async handleNewTab(werePassedURL, searchClipboard, where) {
// Validate browser state first
if (!this._validateBrowserState()) {
console.warn('Browser state invalid for new tab operation');
Expand Down Expand Up @@ -250,6 +250,11 @@ var gZenUIManager = {
return false;
}

// Exit fullscreen if it is active
if (document.fullscreenElement) {
await document.exitFullscreen();
}

// Set visual state with proper validation
if (this._lastTab && !this._lastTab.closing) {
this._lastTab._visuallySelected = false;
Expand Down