Bug 873518 - Fix off-by-one error when moving widgets within their area, r=jaws

--HG--
extra : rebase_source : f88fdacfbdc34564d70eec022fd7201c4490c9aa
This commit is contained in:
Gijs Kruitbosch 2013-05-28 16:34:35 +02:00
parent ecc9f5f892
commit b07c1a24bc

View File

@ -911,6 +911,11 @@ let CustomizableUIInternal = {
}
placements.splice(oldPlacement.position, 1);
// If we just removed the item from *before* where it is now added,
// we need to compensate the position offset for that:
if (oldPlacement.position < aPosition) {
aPosition--;
}
placements.splice(aPosition, 0, aWidgetId);
let widget = gPalette.get(aWidgetId);