Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: PlateController forgets the active editor on blur #4171

Merged
merged 6 commits into from
Mar 17, 2025

Conversation

12joan
Copy link
Collaborator

@12joan 12joan commented Mar 17, 2025

Fixes #4143

Due to the store setter methods not being stable, the code that was supposed to unset the active editor when that editor unmounts was being called when the editor is blurred.

This PR also adds Playwright tests for PlateController in tooling/e2e/plate-controller.spec.ts and creates a new page /e2e-examples/plate-controller where PlateController can be tested.

Copy link

codesandbox bot commented Mar 17, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Mar 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 17, 2025 4:51pm

Copy link

changeset-bot bot commented Mar 17, 2025

🦋 Changeset detected

Latest commit: ce307b1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 58 packages
Name Type
@udecode/plate-core Major
@udecode/react-utils Major
@udecode/plate-utils Major
@udecode/plate Major
@udecode/cn Major
@udecode/plate-alignment Major
@udecode/plate-autoformat Major
@udecode/plate-basic-elements Major
@udecode/plate-basic-marks Major
@udecode/plate-block-quote Major
@udecode/plate-break Major
@udecode/plate-callout Major
@udecode/plate-caption Major
@udecode/plate-code-block Major
@udecode/plate-combobox Major
@udecode/plate-comments Major
@udecode/plate-csv Major
@udecode/plate-cursor Major
@udecode/plate-date Major
@udecode/plate-diff Major
@udecode/plate-dnd Major
@udecode/plate-docx Major
@udecode/plate-emoji Major
@udecode/plate-excalidraw Major
@udecode/plate-find-replace Major
@udecode/plate-floating Major
@udecode/plate-font Major
@udecode/plate-heading Major
@udecode/plate-highlight Major
@udecode/plate-horizontal-rule Major
@udecode/plate-indent-list Major
@udecode/plate-indent Major
@udecode/plate-juice Major
@udecode/plate-kbd Major
@udecode/plate-layout Major
@udecode/plate-line-height Major
@udecode/plate-link Major
@udecode/plate-list Major
@udecode/plate-markdown Major
@udecode/plate-math Major
@udecode/plate-media Major
@udecode/plate-mention Major
@udecode/plate-node-id Major
@udecode/plate-normalizers Major
@udecode/plate-playwright Major
@udecode/plate-reset-node Major
@udecode/plate-resizable Major
@udecode/plate-select Major
@udecode/plate-selection Major
@udecode/plate-slash-command Major
@udecode/plate-suggestion Major
@udecode/plate-tabbable Major
@udecode/plate-table Major
@udecode/plate-tag Major
@udecode/plate-toggle Major
@udecode/plate-trailing-block Major
@udecode/plate-yjs Major
@udecode/plate-ai Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@zbeyens zbeyens merged commit ec43961 into main Mar 17, 2025
8 checks passed
@zbeyens zbeyens deleted the fix/plate-controller-on-blur branch March 17, 2025 17:17
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.

v44 - 46: useEditorRef no longer returns the currently active editor.
2 participants