mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Revert "Flush DOM before displaying context menu"
This commit is contained in:
committed by
GitHub
parent
847ca8f71b
commit
8e6cef458c
@@ -3,7 +3,6 @@ path = require 'path'
|
||||
fs = require 'fs'
|
||||
url = require 'url'
|
||||
{EventEmitter} = require 'events'
|
||||
ContextMenu = require './context-menu'
|
||||
|
||||
module.exports =
|
||||
class AtomWindow
|
||||
@@ -101,8 +100,11 @@ class AtomWindow
|
||||
|
||||
hasProjectPath: -> @getLoadSettings().initialPaths?.length > 0
|
||||
|
||||
openContextMenu: (menuTemplate) ->
|
||||
new ContextMenu(menuTemplate, this)
|
||||
setupContextMenu: ->
|
||||
ContextMenu = require './context-menu'
|
||||
|
||||
@browserWindow.on 'context-menu', (menuTemplate) =>
|
||||
new ContextMenu(menuTemplate, this)
|
||||
|
||||
containsPaths: (paths) ->
|
||||
for pathToCheck in paths
|
||||
@@ -164,6 +166,8 @@ class AtomWindow
|
||||
unless url is @browserWindow.webContents.getURL()
|
||||
event.preventDefault()
|
||||
|
||||
@setupContextMenu()
|
||||
|
||||
if @isSpec
|
||||
# Spec window's web view should always have focus
|
||||
@browserWindow.on 'blur', =>
|
||||
|
||||
Reference in New Issue
Block a user