   if ckeditors.length
     $('body').prepend("<div id='effective-ckeditor-top'></div>").addClass('effective-ckeditor-editting')
 
-    $(window).on 'beforeunload', (event) -> promptToSaveIfDirty(event)
+    $(window).on 'beforeunload', (event) -> promptToSaveIfDirtyWindow(event)
+    $(document).on 'click', 'a', (event) -> promptToSaveIfDirtyLink(event)
     $(window).on 'unload', (event) -> $.cookie('effective_regions_editting', '', {path: '/', expires: -1})
 
     ckeditors.each ->

    'You have unsaved changes'
  else
    event.stopPropagation()

affixBootstrapMenu = (editor_div) ->
  dropdown_menu = editor_div.closest('.dropdown-menu')

    imagesPath: CKEDITOR.getUrl( window.location.protocol + '//' + window.location.host + '/assets/effective/templates/' ),
    templates: template for template in templates

promptToSaveIfDirtyWindow = (event) ->
  dirty = false

  for name, instance of CKEDITOR.instances
