Fix for MDL-7563. Added call to removeFromGroup() from block_class.delete_button(). Thanks Andrew Walker for the patch!
This commit is contained in:
@@ -243,18 +243,20 @@ block_class.prototype.toggle_hide = function(e, target, isCosmetic) {
|
||||
|
||||
|
||||
block_class.prototype.delete_button = function() {
|
||||
|
||||
//remove from local model
|
||||
// Remove from local model.
|
||||
if (main.rightcolumn.has_block(this)) {
|
||||
main.rightcolumn.remove_block(this);
|
||||
} else if (main.leftcolumn.has_block(this)) {
|
||||
main.leftcolumn.remove_block(this);
|
||||
}
|
||||
//remove from remote model
|
||||
main.connect('DELETE','class=block&instanceId='+this.instanceId);
|
||||
// Remove block from the drag and drop group in YUI.
|
||||
this.removeFromGroup('blocks');
|
||||
|
||||
// Remove from remote model.
|
||||
main.connect('DELETE', 'class=block&instanceId='+this.instanceId);
|
||||
|
||||
//remove from view
|
||||
main.blocks[main.get_block_index(this)] = null;
|
||||
// Remove from view
|
||||
main.blocks.splice(main.get_block_index(this), 1);
|
||||
this.getEl().parentNode.removeChild(this.getEl());
|
||||
|
||||
if (this.debug) {
|
||||
|
||||
Reference in New Issue
Block a user