Bug 855295 - Follow-up - Fix dragging widgets back into the palette when customizing. r=Unfocused.

This commit is contained in:
Mike Conley 2013-04-05 09:58:31 -04:00
parent 646814d727
commit 4fae036bba

View File

@ -491,16 +491,6 @@ CustomizeMode.prototype = {
return;
}
// We need to determine the place that the widget is being dropped in
// the target.
let placement = CustomizableUI.getPlacementOfWidget(targetNode.firstChild.id);
if (!placement) {
ERROR("Could not get a position for " + targetNode.firstChild.id);
return;
}
let position = placement.position;
// Is the target area the customization palette? If so, we have two cases -
// either the originArea was the palette, or a customizable area.
if (targetArea.id === kPaletteId) {
@ -520,6 +510,16 @@ CustomizeMode.prototype = {
return;
}
// We need to determine the place that the widget is being dropped in
// the target.
let placement = CustomizableUI.getPlacementOfWidget(targetNode.firstChild.id);
if (!placement) {
ERROR("Could not get a position for " + targetNode.firstChild.id);
return;
}
let position = placement.position;
// Is the target area the same as the origin? Since we've already handled
// the possibility that the target is the customization palette, we know
// that the widget is moving within a customizable area.