mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Fixes issue with esc key not deselecting the current thang
This commit is contained in:
parent
94f70ca9f4
commit
cbe5f3a011
1 changed files with 1 additions and 1 deletions
|
@ -250,7 +250,7 @@ module.exports = class ThangsTabView extends View
|
|||
# @thangsTreema.deselectAll()
|
||||
|
||||
selectAddThang: (e) =>
|
||||
return unless e? and $(e.target).closest('#editor-level-thangs-tab-view').length
|
||||
return unless e? and $(e.target).closest('#editor-level-thangs-tab-view').length or key.isPressed('esc')
|
||||
if e then target = $(e.target) else target = @$el.find('.add-thangs-palette') # pretend to click on background if no event
|
||||
return true if target.attr('id') is 'surface'
|
||||
target = target.closest('.add-thang-palette-icon')
|
||||
|
|
Loading…
Reference in a new issue