Skip to content

Conversation

@Aslam97
Copy link
Contributor

@Aslam97 Aslam97 commented Oct 20, 2025

This PR demonstrates how to scope the mouse tracking inside the editor by providing an opt-in mechanism to use ProseMirror's handleDOMEvents instead of root-level event listeners.

Summary

Adds a configurable useHandleDOMEvents option to the SideMenu plugin, allowing users to choose between two event handling strategies for mouse tracking.

Rationale

Issue here #1016

Changes

Impact

Testing

Screenshots/Video

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

@vercel
Copy link

vercel bot commented Oct 20, 2025

@Aslam97 is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

@nperez0111
Copy link
Contributor

@Aslam97 thanks for this, but I don't think this is the direction of where we want to go in exposing this configuration. For one, this should be known upfront, so the useEffect feels like a hack, than a supported solution.

Secondly, I don't know that it is worth it to switch between which API to use just for this. Instead of listening to the root level element this should switch to the editor dom element instead & listen on that, so no need for handleDOMEvents api which does essentially the same thing as an addEventListener would

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