Skip to content

Close story editor's link preview on outside click #6209

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

Closed
wants to merge 3 commits into from

Conversation

LBBO
Copy link

@LBBO LBBO commented Dec 13, 2022

First time contributor checklist:

Contributor checklist:

Description

Fixes #6207

This PR adds an event handler to clicks outside of the link preview popup in the story editor to close the corresponding popup. During implementation, I noticed that the font editor serves a similar purpose despite being implemented differently. Most importantly, it's opened by clicks into / next to the story itself. I decided to add a similar event handler nonetheless, but it's in a separate commit, so it can be easily removed from this PR if desired.

@LBBO
Copy link
Author

LBBO commented Dec 21, 2022

Is there anything I can do to fix the pipeline? From the logs, it looks like an API key is missing.

@scottnonnenberg-signal
Copy link
Contributor

Hey there @LBBO. I did some testing of these changes after merging into a private branch, and found that it broke an important behavior: in the Text Story editor, when I clicked in the middle of existing story text to start editing there, the focus would be forced to the end of the text block. I don't see this in recent builds, so it does seem to be a regression with your changes.

Also, useCapture is it a bit dangerous to use - any chance you can update this PR to remove it from useEscapeHandling?

@scottnonnenberg-signal
Copy link
Contributor

Closing, since it's been six months since last activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking outside of story link editor popup doesn't close popup
3 participants