Skip to content

GH-11175: Fix table context toolbar jumping on keypress in small editors - #11243

Open
davue wants to merge 1 commit into
tinymce:mainfrom
davue:hotfix/gh-11175-table-toolbar-jumping
Open

davue wants to merge 1 commit into
tinymce:mainfrom
davue:hotfix/gh-11175-table-toolbar-jumping

Conversation

@davue

@davue davue commented Aug 28, 2026

Copy link
Copy Markdown

Related Ticket:

Description of Changes:

  • Fixed the table context toolbar oscillating up and down on every keypress when a small table filled a small editor.
  • Root cause: in ContextToolbarAnchor.ts, when the selection overlapped the toolbar and it wasn't a reposition, the inset layout used LayoutInset.flip, which inverts the current placement. In a small editor both the north and south inset placements overlap the selection, so each keypress flipped to a side that still overlapped, flipping back on the next keypress.
  • Fix: only flip when the opposite placement would actually clear the selection; otherwise preserve the current placement so the toolbar stays put. TINY-7192 (flip on overlap) and TINY-7545 (preserve on scroll) behaviour is unchanged.
  • Added a regression test (ContextToolbarSmallEditorStabilityTest.ts) that fails without the fix and passes with it.

Pre-checks:

  • Changelog entry added
  • Tests have been added (if applicable)
  • Branch prefixed with feature/, hotfix/ or spike/

Review:

  • Milestone set
  • Docs ticket created (if applicable)

GitHub issues (if applicable): #11175

…ll editors

The table context toolbar oscillated up and down on every keypress when a
small table filled a small editor. When the selection overlapped the toolbar
and this wasn't a reposition, the inset layout used LayoutInset.flip, which
inverts the current placement. In a small editor both the north and south
inset placements overlap the selection, so each keypress flipped to a side
that still overlapped, flipping back on the next keypress.

Only flip when the opposite placement would actually clear the selection;
otherwise preserve the current placement so the toolbar stays put.
@davue
davue requested a review from a team as a code owner August 28, 2026 13:46
@davue
davue requested review from hamza0867 and spocke August 28, 2026 13:46

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants