mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Propagate the event, but only handle it once in
the project plugin pane
This commit is contained in:
@@ -18,6 +18,8 @@ class ProjectPane extends Pane
|
||||
@reload()
|
||||
|
||||
$('#project li').live 'click', (event) =>
|
||||
return true if event.__projectClicked__
|
||||
|
||||
$('#project .active').removeClass 'active'
|
||||
el = $(event.currentTarget)
|
||||
path = decodeURIComponent el.attr 'path'
|
||||
@@ -37,8 +39,13 @@ class ProjectPane extends Pane
|
||||
else
|
||||
el.addClass 'active'
|
||||
@window.open path
|
||||
|
||||
false # Don't bubble!
|
||||
|
||||
# HACK I need the event to propogate beyond the project pane,
|
||||
# but I need the project pane to ignore it. Need somehting
|
||||
# cleaner here.
|
||||
event.__projectClicked__ = true
|
||||
|
||||
true
|
||||
|
||||
reload: ->
|
||||
@html.children('#project .cwd').text _.last @window.path.split '/'
|
||||
|
||||
Reference in New Issue
Block a user