Skip to content

Conversation

@ad-si
Copy link

@ad-si ad-si commented Mar 19, 2025

relatedTarget is quite helpful for MouseEvents, FocusEvents, etc. where you are moving from one element to another one.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a reference to this PR
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@garyb
Copy link
Member

garyb commented Mar 21, 2025

Thanks for the submission! But this already exists in the purescript-web-uievents library under the types it's specified for in particular:

@garyb garyb closed this Mar 21, 2025
@ad-si
Copy link
Author

ad-si commented Mar 21, 2025

But there is no implementation for DragEvent. Am I supposed to convert to convert DragEvent -> Event -> MouseEvent? That feels wrong ...

@garyb
Copy link
Member

garyb commented Mar 21, 2025

Ah no, there definitely should be a total fromMouseEvent :: DragEvent -> MouseEvent conversion in https://github.com/purescript-web/purescript-web-html/blob/master/src/Web/HTML/Event/DragEvent.purs

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