Merge "Set snapTargetBeforeMinimized to middle target if position is negative" into pi-dev