Fixes #2061
[redakcja.git] / redakcja / static / js / wiki / view_editor_wysiwyg.js
index 3ccaea7..75c1c63 100644 (file)
                     }
                 }
                 
-                $(specialCharsContainer).remove();
             });         
             $('#specialCharsClose').click(function(){
                 $(specialCharsContainer).remove();
                             $overlay.remove();
                         },
                         error: function(text){
-                            $overlay.remove();
                             alert('Błąd! ' + text);
                         }
                     })
                 });
 
                 $(document).bind('click.blur-overlay', function(event){
-                    if ($(event.target).parents('.html-editarea').length > 0) {
+                    if ($(event.target).closest('.html-editarea, #specialCharsContainer').length > 0) {
                         return;
                     }
                     save();