mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Don't let atom spec bind default keys again
This commit is contained in:
@@ -7,6 +7,8 @@ describe "Atom", ->
|
||||
waitsFor "there to be no windows", ->
|
||||
atom.windows.length == 0
|
||||
|
||||
beforeEach ->
|
||||
spyOn(Atom.prototype, "setUpKeymap")
|
||||
|
||||
describe ".open(path)", ->
|
||||
beforeEach ->
|
||||
@@ -39,9 +41,6 @@ describe "Atom", ->
|
||||
beforeEach ->
|
||||
atom = new Atom
|
||||
|
||||
afterEach ->
|
||||
atom.destroy()
|
||||
|
||||
it "adds the window to the windows array if it isn't already present", ->
|
||||
atom.windowOpened window
|
||||
atom.windowOpened window
|
||||
|
||||
@@ -24,10 +24,6 @@ class Atom
|
||||
$(document).on 'keydown', @handleKeyEvent
|
||||
@keymap.bindDefaultKeys()
|
||||
|
||||
destroy: ->
|
||||
$(document).off 'keydown', @handleKeyEvent
|
||||
@keymap.unbindDefaultKeys()
|
||||
|
||||
open: (path) ->
|
||||
$native.open path
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@ class Keymap
|
||||
path = $native.openDialog()
|
||||
atom.open(path) if path
|
||||
|
||||
unbindDefaultKeys: ->
|
||||
$(document).unbind 'new-window', @_newWindow
|
||||
$(document).unbind 'open', @_open
|
||||
|
||||
bindKeys: (selector, bindings) ->
|
||||
@bindingSets.unshift(new BindingSet(selector, bindings))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user