core/modules/edit/js/views/FieldToolbarView.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core/modules/edit/js/views/FieldToolbarView.js b/core/modules/edit/js/views/FieldToolbarView.js index 24513d8..56b7c1e 100644 --- a/core/modules/edit/js/views/FieldToolbarView.js +++ b/core/modules/edit/js/views/FieldToolbarView.js @@ -67,8 +67,6 @@ Drupal.edit.FieldToolbarView = Backbone.View.extend({ } break; case 'candidate': - // Remove the toolbar; it is no longer necessary. - this.$el.remove(); break; case 'highlighted': break; @@ -175,11 +173,11 @@ Drupal.edit.FieldToolbarView = Backbone.View.extend({ var $group = this._find(toolgroup); // Attach a transitionEnd event handler to the toolbar group so that update // events can be triggered after the animations have ended. - $group - .on(Drupal.edit.util.constants.transitionEnd, function (event) { - that.entityModel.trigger('viewChanged', that); - $group.off(Drupal.edit.util.constants.transitionEnd); - }); + $group.on(Drupal.edit.util.constants.transitionEnd, function (event) { + var entityModel = that.model.get('entity'); + entityModel.trigger('viewChanged', entityModel); + $group.off(Drupal.edit.util.constants.transitionEnd); + }); // The call to remove the class and start the animation must be started in // the next animation frame or the event handler attached above won't be // triggered.