Bug 1062014 - Add node existence check to CustomizeMode's onDragEnd. r=mconley.

This commit is contained in:
Ruth 2014-10-14 20:07:05 -04:00
parent a6f0eeb1b5
commit dfb65a6c18

View File

@ -1905,8 +1905,14 @@ CustomizeMode.prototype = {
aEvent.dataTransfer.mozGetDataAt(kDragDataTypePrefix + documentId, 0); aEvent.dataTransfer.mozGetDataAt(kDragDataTypePrefix + documentId, 0);
let draggedWrapper = document.getElementById("wrapper-" + draggedItemId); let draggedWrapper = document.getElementById("wrapper-" + draggedItemId);
// DraggedWrapper might no longer available if a widget node is
// destroyed after starting (but before stopping) a drag.
if (draggedWrapper) {
draggedWrapper.hidden = false; draggedWrapper.hidden = false;
draggedWrapper.removeAttribute("mousedown"); draggedWrapper.removeAttribute("mousedown");
}
if (this._dragOverItem) { if (this._dragOverItem) {
this._cancelDragActive(this._dragOverItem); this._cancelDragActive(this._dragOverItem);
this._dragOverItem = null; this._dragOverItem = null;