Skip to content

fix(richtext-lexical): floating select toolbar caret not positioned correctly if first line is selected#4062

Merged
AlessioGr merged 1 commit intomainfrom
fix/lexical-caret-positioning
Nov 8, 2023
Merged

fix(richtext-lexical): floating select toolbar caret not positioned correctly if first line is selected#4062
AlessioGr merged 1 commit intomainfrom
fix/lexical-caret-positioning

Conversation

@AlessioGr
Copy link
Copy Markdown
Member

@AlessioGr AlessioGr commented Nov 8, 2023

Description

Fixes #4041

This is a dirty fix, but it does its job. Given it's such a minor issue, this dirty fix will suffice for now. When more time is available, the setFloatingElemPosition function should be refactored.

Old:
Screenshot 2023-11-08 at 22 10 54

New:
Screenshot 2023-11-08 at 22 10 09

Despite it being

  • I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • Chore (non-breaking change which does not add functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Change to the templates directory (does not affect core functionality)
  • Change to the examples directory (does not affect core functionality)
  • This change requires a documentation update

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes
  • I have made corresponding changes to the documentation

@AlessioGr AlessioGr added the plugin: richtext-lexical @payloadcms/richtext-lexical label Nov 8, 2023
@AlessioGr AlessioGr merged commit c462df3 into main Nov 8, 2023
@AlessioGr AlessioGr deleted the fix/lexical-caret-positioning branch November 8, 2023 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: richtext-lexical @payloadcms/richtext-lexical

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lexical: Floating select toolbar caret incorrectly positioned when selecting first line of text

1 participant