Skip to content

Lexical: Floating select toolbar caret incorrectly positioned when selecting second line of text #6139

@timotgl

Description

@timotgl

Link to reproduction

https://demo.payloadcms.com/admin/collections/posts/6630dd6648cc4c160078c81f

Describe the Bug

Select any word in the second line of text in the editor. The caret (little upside down triangle normally positioned on the floating toolbar) seems to be misplaced.

From the official demo:
Screenshot 2024-04-30 at 14 51 37

From our own project (payload 2.13.0):
Screenshot 2024-04-30 at 14 55 27

For us, the first line is affected, the caret is positioned on top of the first icon in the toolbar.

Maybe related to #4041

To Reproduce

Select any word in the second line of text in the editor. The caret (little upside down triangle normally positioned on the floating toolbar) seems to be misplaced.

Payload Version

2.13.0

Adapters and Plugins

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions