 
   setupOnBeforeUnload: ->
     window.onbeforeunload = =>
-      if $.active > 0 then "Your article is not finished saving." else null
+      if $.active > 0
+        "Your article is not finished saving."
+      else if @changedPublishedArticle is true
+        "You have unsaved changes, do you wish to continue?"
+      else
+        null
 
   setupTitleAutosize: ->
     @$('#edit-title textarea').autosize()

    @$window = $(window)
    @article.sections.removeBlank()
    @article.sync = _.debounce _.bind(@article.sync, @article), 500
    @article.sections.on 'add remove reset', => @article.save()
    @article.on 'missing', @highlightMissingFields
    @article.on 'finished', @onFinished
    @article.on 'loading', @showSpinner

    @openTab $(e.target).index()

  onKeyup: =>
    if @article.published
      @changedPublishedArticle = true
    else
      @article.save @serialize()
    @toggleAstericks()

  popLockControls: =>
