mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 16:08:24 +03:00
Remove window.rootView shims
This commit is contained in:
parent
bc1a743b2f
commit
e4aa82fda1
@ -216,18 +216,14 @@ class AtomPackage extends Package
|
||||
@activateStylesheets()
|
||||
@requireMainModule()
|
||||
|
||||
# Private: TODO remove once packages have been updated
|
||||
getRootView: ->
|
||||
atom?.rootView ? window.rootView
|
||||
|
||||
subscribeToActivationEvents: ->
|
||||
return unless @metadata.activationEvents?
|
||||
if _.isArray(@metadata.activationEvents)
|
||||
@getRootView().command(event, @handleActivationEvent) for event in @metadata.activationEvents
|
||||
atom.rootView.command(event, @handleActivationEvent) for event in @metadata.activationEvents
|
||||
else if _.isString(@metadata.activationEvents)
|
||||
@getRootView().command(@metadata.activationEvents, @handleActivationEvent)
|
||||
atom.rootView.command(@metadata.activationEvents, @handleActivationEvent)
|
||||
else
|
||||
@getRootView().command(event, selector, @handleActivationEvent) for event, selector of @metadata.activationEvents
|
||||
atom.rootView.command(event, selector, @handleActivationEvent) for event, selector of @metadata.activationEvents
|
||||
|
||||
handleActivationEvent: (event) =>
|
||||
bubblePathEventHandlers = @disableEventHandlersOnBubblePath(event)
|
||||
|
@ -171,9 +171,7 @@ class SelectList extends View
|
||||
if @previouslyFocusedElement?.isOnDom()
|
||||
@previouslyFocusedElement.focus()
|
||||
else
|
||||
# TODO Remove once all packages have been updated
|
||||
rootView = atom?.rootView ? window.rootView
|
||||
rootView.focus()
|
||||
atom.rootView.focus()
|
||||
|
||||
# Public:
|
||||
cancelled: ->
|
||||
|
Loading…
Reference in New Issue
Block a user