-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
plugin: richtext-lexical@payloadcms/richtext-lexical@payloadcms/richtext-lexical
Description
Describe the Bug
When using the Payload Template with a Lexical RichText field that contains an Array-type block, adding a row to a second Array block causes the editor viewport to jump/scroll back to the first Array block instead of keeping focus/scroll position on the newly added row in the second block.
Aufzeichnung.2025-10-23.122017.1.mp4
Link to the code that reproduces this issue
https://github.com/MarvinVrdoljak/payload-bug-report-3/tree/array-viewport-scroll-bug-in-lexical
Reproduction Steps
- Open any page/collection that uses a Lexical RichText field (e.g., a Hero (Lexical) block) which allows inserting an Array block.
- Insert an Array block into the rich text and add a row.
- Add some content (text/blocks) so that the page becomes scrollable—this makes the scrolling issue easier to see.
- Below that content, insert another Array block and add a row to this second block.
- Observed: as soon as the row is added, the editor scrolls up to the first Array block instead of keeping the viewport at (or scrolling to) the newly created row in the second block.
Which area(s) are affected? (Select all that apply)
area: ui
Environment Info
Binaries:
Node: 22.14.0
npm: 10.9.2
Yarn: N/A
pnpm: 10.10.0
Relevant Packages:
payload: 3.61.0
next: 15.3.0
@payloadcms/db-mongodb: 3.61.0
@payloadcms/email-nodemailer: 3.61.0
@payloadcms/graphql: 3.61.0
@payloadcms/live-preview: 3.61.0
@payloadcms/live-preview-react: 3.61.0
@payloadcms/next/utilities: 3.61.0
@payloadcms/payload-cloud: 3.61.0
@payloadcms/plugin-form-builder: 3.61.0
@payloadcms/plugin-nested-docs: 3.61.0
@payloadcms/plugin-redirects: 3.61.0
@payloadcms/plugin-search: 3.61.0
@payloadcms/plugin-seo: 3.61.0
@payloadcms/richtext-lexical: 3.61.0
@payloadcms/translations: 3.61.0
@payloadcms/ui/shared: 3.61.0
react: 19.1.0
react-dom: 19.1.0
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Tue Nov 5 00:21:55 UTC 2024
Available memory (MB): 15672
Available CPU cores: 22
Metadata
Metadata
Assignees
Labels
plugin: richtext-lexical@payloadcms/richtext-lexical@payloadcms/richtext-lexical