Permalink
Browse files

Merge pull request #221 from gergely-ujvari/220-unnecessary-unsaved-r…

…eply-warning-window

fix #220
  • Loading branch information...
2 parents 40865c1 + 9e45673 commit 719e160953433bbbd50a7dbb5ce923f7b230450a @tilgovi tilgovi committed Nov 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 h/js/controllers.coffee
View
@@ -328,13 +328,13 @@ class Hypothesis extends Annotator
# Returns itself for chaining.
_setupEditor: ->
@editor = this._createEditor()
+ .on 'hide save', =>
+ if @unsaved_drafts.indexOf(@editor) > -1
+ @unsaved_drafts.splice(@unsaved_drafts.indexOf(@editor), 1)
.on 'hide', =>
@provider.onEditorHide()
.on 'save', =>
@provider.onEditorSubmit()
- .on 'hide save', =>
- if @unsaved_drafts.indexOf(@editor) > -1
- @unsaved_drafts.splice(@unsaved_drafts.indexOf(@editor), 1)
this
_createEditor: ->

0 comments on commit 719e160

Please sign in to comment.