File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ export function updateStops(stops) {
1313 else if ( ! stop . _manual ) {
1414 // Treat null/undefined as unset; 0 is a valid value and must be preserved
1515 const p1Unset = ( stop . position1 == null ) || ( stop . auto != null && String ( stop . position1 ) == String ( stop . auto ) )
16- const p2UnsetOrAuto = ( stop . position2 == null ) || ( stop . auto != null && String ( stop . position2 ) == String ( stop . auto ) )
16+ const p2Unset = ( stop . position2 == null )
1717
1818 // Only assign auto for position1 when it is unset or previously auto-managed
1919 if ( p1Unset ) stop . position1 = autoVal
2020
21- // Only assign auto for position2 when it's unset or previously auto-managed.
22- // Preserve any explicitly provided second position (e.g., from presets) to avoid regressions .
23- if ( p2UnsetOrAuto ) stop . position2 = p1Unset ? autoVal : stop . position1
21+ // Only assign a second position when it is truly unset. Never override an existing value,
22+ // even if it equals the auto position, to preserve explicit spans from presets/URL restores .
23+ if ( p2Unset ) stop . position2 = p1Unset ? autoVal : stop . position1
2424 }
2525 // Clear the manual flag after one normalization pass so future edits behave normally
2626 if ( stop . _manual ) delete stop . _manual
You can’t perform that action at this time.
0 commit comments