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

fix: focus the editor before opening the floating link toolbar #4073

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

EvanSmith93
Copy link
Contributor

@EvanSmith93 EvanSmith93 commented Feb 11, 2025

Checklist

  • yarn typecheck
  • yarn lint:fix
  • yarn test
  • yarn brl
  • yarn changeset
  • ui changelog

Before, if the user clicked the link button in the toolbar when the editor was not focused, the floating toolbar popup would show up near or off the edge of the editor.

Now, clicking the link button will first auto-focus on the editor before opening up the floating link popup. That way the floating popup always appears in the correct position.

While I am not sure, this fix sounds like it may fix issue #3812. I tried to reproduce the bug described in this issue, however the symptoms I was experiencing were slightly different. I noticed the floating popover was misplaced after the first click of the link button, whereas they reported the issue after the second click. This may fix both issues though.

Copy link

codesandbox bot commented Feb 11, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

changeset-bot bot commented Feb 11, 2025

🦋 Changeset detected

Latest commit: ae51aaa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@udecode/plate-link Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
plate ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 11, 2025 8:57am

@zbeyens
Copy link
Member

zbeyens commented Feb 11, 2025

Thanks!

@zbeyens zbeyens merged commit f18a21d into udecode:main Feb 11, 2025
6 checks passed
@EvanSmith93 EvanSmith93 deleted the fix/floating-link-unfocused branch February 11, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants