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

Handle outside click for story creator url popover #6752

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ryprice
Copy link

@ryprice ryprice commented Jan 18, 2024

First time contributor checklist:

Contributor checklist:

  • My contribution is not related to translations.
  • My commits are in nice logical chunks with good commit messages
  • My changes are rebased on the latest main branch
  • A yarn ready run passes successfully (more about tests here)
  • My changes are ready to be shipped to users

Description

Fixes #6207

Currently, the story creator url popover does not close on outside click. This change sets up a click handler, following the pattern used for the similar background color picker, use handleOutsideClick to close the url popover.

Testing

Tested on macOS 10.15.7. No new test cases written.

  • Verified on outside click closes url popover. (note it causes the text editor to open, but this is not a new issue)
  • Verified esc key closed the url popover.
  • Verified clicking on text in edit mode places text cursor where mouse click occurred, and closes url popover. This issue was noted in the previous Close story editor's link preview on outside click #6209.
  • Verified esc and outside click work as expected on color popover.
  • Verified I could add a URL to the story.
closeonoutsideclick.mp4

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

Successfully merging this pull request may close these issues.

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