Skip to content

Commit 72cdba2

Browse files
committed
🎨
1 parent e1459b7 commit 72cdba2

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

lib/browser/api/menu.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ Menu.prototype._init = function () {
118118
executeCommand: (event, commandId) => {
119119
const command = this.commandsMap[commandId]
120120
if (command == null) return
121-
122121
command.click(event, BrowserWindow.getFocusedWindow(), webContents.getFocusedWebContents())
123122
},
124123
menuWillShow: () => {

lib/browser/api/web-contents.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,10 @@ module.exports = {
251251
let focused = null
252252
for (let contents of getAllWebContents()) {
253253
if (!contents.isFocused()) continue
254-
254+
if (focused == null) focused = contents
255255
// Return webview web contents which may be embedded inside another
256256
// web contents that is also reporting as focused
257257
if (contents.getType() === 'webview') return contents
258-
259-
if (focused == null) focused = contents
260258
}
261259
return focused
262260
}

0 commit comments

Comments
 (0)