mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Prevent didReappear from setting up shortcuts twice for RootViews
This commit is contained in:
parent
7749f9cc0a
commit
e2feeb8330
1 changed files with 2 additions and 1 deletions
|
@ -91,8 +91,9 @@ module.exports = class CocoView extends Backbone.View
|
|||
didReappear: ->
|
||||
# the router brings back this view from the cache
|
||||
@delegateEvents()
|
||||
wasHidden = @hidden
|
||||
@hidden = false
|
||||
@listenToShortcuts()
|
||||
@listenToShortcuts() if wasHidden
|
||||
view.didReappear() for id, view of @subviews
|
||||
|
||||
# View Rendering
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue