Skip to content

[players] Stop resizes from corrupting text notes in editing - #2176

Merged
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:main
Aug 7, 2026
Merged

[players] Stop resizes from corrupting text notes in editing#2176
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:main

Conversation

@frankrousseau

Copy link
Copy Markdown
Contributor

Problem

  • A canvas resize while a text note was still in editing (fullscreen exit via the toolbar button, window resize) corrupted the stored annotation: fabric's clear() fires object:modified after setDimensions, so the note was serialized with old-box coordinates against the new dimensions. left/top/scale were multiplied by the resize ratio and the note rendered off-canvas for everyone, while its timeline mark survived.

Solution

  • Exit text editing before setDimensions so the final text is saved against matching dimensions.
  • Mute onObjectModified during programmatic canvas clears, like onObjectAdded and onErasingEnd already were, with a regression test on the clear path.

A canvas resize while a text note was still in editing corrupted the
stored annotation: the reload triggered by the resize cleared the
canvas, fabric's clear() exited the editing session and fired
object:modified after setDimensions, so the note was serialized with
its old-box coordinates against the new dimensions. left/top/scaleX
were multiplied by the resize ratio and the note rendered off-canvas
for everyone, while its timeline mark survived.

Exit text editing before setDimensions so the final text is saved
against matching dimensions, and mute onObjectModified during
programmatic clears like onObjectAdded and onErasingEnd already were.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@frankrousseau
frankrousseau merged commit ebcd837 into cgwire:main Aug 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant