Skip to content

[lexical-playground] Fix: Fixing cursor position after inline equation, fix block equations#8228

Merged
etrepum merged 19 commits intofacebook:mainfrom
Jynx2004:equation_issue
Mar 16, 2026
Merged

[lexical-playground] Fix: Fixing cursor position after inline equation, fix block equations#8228
etrepum merged 19 commits intofacebook:mainfrom
Jynx2004:equation_issue

Conversation

@Jynx2004
Copy link
Copy Markdown
Contributor

@Jynx2004 Jynx2004 commented Mar 16, 2026

Description

Added the display attribute to the parent div/span of the equation node and setting its value according to the __inline value taken from the user.

lexicalequation.online-video-cutter.com.mp4

Closes #7606

Test plan

Not have added any tests as we can see it in our inspect tab in the particular browser.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 16, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Mar 16, 2026 4:33pm
lexical-playground Ready Ready Preview, Comment Mar 16, 2026 4:33pm

Request Review

@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Mar 16, 2026
@etrepum etrepum changed the title [lexical] Fix: Fixing cursor position after equation [lexical] Fix: Fixing cursor position after inline equation, fix block equations Mar 16, 2026
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it’s happening:
The selectors that time out are only rendered in rich‑text mode: the toolbar button (Insert specialized editor node) and the equation node (.editor-equation).
Your run is almost certainly in plain‑text E2E mode (E2E_EDITOR_MODE=plain-text), where the toolbar and markdown/equation features are intentionally absent.
Many tests already skip themselves in plain‑text, but EquationNode.spec.mjs didn’t, so it waits forever for elements that will never appear.

Fix applied (safe for rich‑text):
I updated the EquationNode tests to skip when isPlainText is true, matching the rest of the suite.

@etrepum etrepum added this pull request to the merge queue Mar 16, 2026
Merged via the queue into facebook:main with commit d7de6f0 Mar 16, 2026
40 checks passed
@etrepum etrepum mentioned this pull request Mar 19, 2026
@etrepum etrepum changed the title [lexical] Fix: Fixing cursor position after inline equation, fix block equations [lexical-playground] Fix: Fixing cursor position after inline equation, fix block equations Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Fixing cursor position after equation

2 participants