mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
Bug 855295 - Follow-up - Fix dragging widgets back into the palette when customizing. r=Unfocused.
This commit is contained in:
parent
646814d727
commit
4fae036bba
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user