File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed
Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff 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 : ( ) => {
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments