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(react): update select state when text selection is around #4148

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

bdbch
Copy link
Contributor

@bdbch bdbch commented Jun 22, 2023

Please describe your changes

This fix will now correctly update the props.selected prop when a React component is inside a selection.

How did you accomplish your changes

I created a selection update handler that will check if the react node position is inside the current selection.

How have you tested your changes

I used the ReactComponent demo to test those changes.

Checklist

  • The changes are not breaking the editor
  • Added tests where possible
  • Followed the guidelines
  • Fixed linting issues

@netlify
Copy link

netlify bot commented Jun 22, 2023

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit 77d2e11
🔍 Latest deploy log https://app.netlify.com/sites/tiptap-embed/deploys/649483a6a4ccc4000821b8ec
😎 Deploy Preview https://deploy-preview-4148--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@bdbch bdbch self-assigned this Jun 25, 2023
@bdbch bdbch merged commit 5bd5bd4 into develop Jul 7, 2023
14 checks passed
@bdbch bdbch deleted the fix/react-select-state branch July 7, 2023 09:22
andrewlu0 pushed a commit to trybaseplate/tiptap that referenced this pull request Oct 20, 2023
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.

1 participant