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

Lexical / Paragraph menu fails in modal view #4410

Closed
patricsgamma opened this issue Dec 7, 2023 · 5 comments
Closed

Lexical / Paragraph menu fails in modal view #4410

patricsgamma opened this issue Dec 7, 2023 · 5 comments
Assignees
Labels
plugin: richtext-lexical @payloadcms/richtext-lexical status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@patricsgamma
Copy link

patricsgamma commented Dec 7, 2023

Link to reproduction

https://github.com/patricsgamma/payload/tree/test/modal_slash

Describe the Bug

At the start of a new Paragraph within a lexical richtext field, when entering a slash "/" a menu for paragraph options appears.

✔️ This works well within a normal create or edit page
❌ It does not work when the lexical editor is embedded within a modal view. The slash "/" is just typed as such but not triggering the menu.

✔️ Video of working menu in create view

Creating a ConversationText within its own collection create view works.

working_menu.mov

❌ Video of failing modal view:

Creating a ConversationText within its parent Conversation fails.

failing_menu.mov

To Reproduce

Payload Version

"payload": "^2.3.1"

Adapters and Plugins

"@payloadcms/bundler-webpack": "^1.0.5",     
"@payloadcms/db-mongodb": "^1.1.0",     
"@payloadcms/plugin-cloud-storage": "^1.1.1",     
"@payloadcms/plugin-sentry": "^0.0.6",     
"@payloadcms/richtext-lexical": "^0.3.1"
@patricsgamma patricsgamma added the status: needs-triage Possible bug which hasn't been reproduced yet label Dec 7, 2023
@AlessioGr AlessioGr self-assigned this Dec 7, 2023
@AlessioGr AlessioGr added the plugin: richtext-lexical @payloadcms/richtext-lexical label Dec 7, 2023
@AlessioGr
Copy link
Member

Hey @patricsgamma , I cannot reproduce it - even for very deeply nested drawers:

Screenshot.2023-12-07.at.14.33.02.mp4

When used inside a Blocks field, like you did:

Screenshot.2023-12-07.at.14.35.56.mp4

Could you attach a reproduction, following this reproduction guide?

@AlessioGr AlessioGr added status: cant-reproduce If an issue cannot be reproduced status: needs-repro If an issue does not include a reproduction and removed status: needs-triage Possible bug which hasn't been reproduced yet labels Dec 7, 2023
@patricsgamma
Copy link
Author

patricsgamma commented Dec 18, 2023

Reproduction added

@AlessioGr AlessioGr added status: needs-triage Possible bug which hasn't been reproduced yet correct-reproduction and removed status: cant-reproduce If an issue cannot be reproduced status: needs-repro If an issue does not include a reproduction labels Dec 18, 2023
@AlessioGr
Copy link
Member

AlessioGr commented Dec 20, 2023

Screenshot.2023-12-20.at.20.57.18.mp4

The issue seems to be due to the condition in your navigation group field. The condition is running infinitely, which'd probably cause a buunch of issues.

You need to make sure you're returning a boolean, e.g. changing return props?.navigation to return !!props?.navigation already fixes this issue.

That being said, it seems weird that simply not returning a boolean causes this issue - I'll dig into that

@AlessioGr
Copy link
Member

Closing this in favor of #4577 which describes the core issue. Will investigate this there

@AlessioGr AlessioGr closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2023
Copy link
Contributor

github-actions bot commented Sep 7, 2024

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
plugin: richtext-lexical @payloadcms/richtext-lexical status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

2 participants