Permalink
Browse files

Issue #220 - fix for the bug

  • Loading branch information...
1 parent 40865c1 commit 9e4567327d956cb3c92fc29ad699abd18c5eda38 Ujvari Gergely committed Nov 28, 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 9e45673

Please sign in to comment.