Commit 3c891881 authored by webchick's avatar webchick

Issue #1967728 by Wim Leers: Fixed In-place editing toolbars in DOM not...

Issue #1967728 by Wim Leers: Fixed In-place editing toolbars in DOM not removed after stopping in-place editing.
parent 1fb4c7e1
......@@ -66,7 +66,7 @@ Drupal.theme.editModal = function(settings) {
*/
Drupal.theme.editToolbarContainer = function(settings) {
var html = '';
html += '<div id="' + settings.id + '" class="edit-toolbar-container edit-animate-invisible edit-animate-only-visibility">';
html += '<div id="' + settings.id + '" class="edit-toolbar-container">';
html += ' <div class="edit-toolbar-heightfaker edit-animate-fast">';
html += ' <div class="edit-toolbar primary" />';
html += ' </div>';
......
......@@ -408,31 +408,6 @@ Drupal.edit.views.ToolbarView = Backbone.View.extend({
else {
this.$el.insertBefore(this.editor.element);
}
var that = this;
// Animate the toolbar into visibility.
setTimeout(function () {
that.$el.removeClass('edit-animate-invisible');
}, 0);
},
remove: function () {
if (!this.$el) {
return;
}
// Remove after animation.
var that = this;
var $el = this.$el;
this.$el
.addClass('edit-animate-invisible')
// Prevent this toolbar from being detected *while* it is being removed.
.removeAttr('id')
.find('.edit-toolbar .edit-toolgroup')
.addClass('edit-animate-invisible')
.on(Drupal.edit.util.constants.transitionEnd, function (e) {
$el.remove();
});
},
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment