Skip to content

Sheets: paste ignores merge metadata #936

Description

@hackerwins

Follow-up from #74 / PR #927, which solved merge propagation for drag-move
(moveRangeTo) and explicitly deferred the same problem for paste.

Sheet.paste (packages/sheets/src/model/worksheet/sheet.ts) references merges
only via expandChangedSrefsWithMergeAliases, for recalculation. It neither
carries a copied merged block's layout to the paste destination nor validates
that the paste target would split an existing merge, so pasting over merged
cells writes content into covered cells that stay hidden under the merge — and
resurfaces as stale data on unmerge, which is the exact class #927 fixed for
drag-move.

The same propagate-or-reject decision applies, and the machinery already
exists: getMergesIntersecting, mergeCoveredSrefs, rebuildMergeCoverMap,
plus the covered-cell clearing and changedSrefs invalidation that #927 added.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp:sheetsRelated to wafflebase sheets component

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions