-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
use DragEvent not MouseEvent for drag events #3137
Conversation
26dc8ea
to
82a7e5c
Compare
Resolved |
82a7e5c
to
3b64b08
Compare
Looks great! 👍 I just edited this to match the other web events that aren't using a wrapper struct (like |
cf49a51
to
6de77b0
Compare
6de77b0
to
6fa5c96
Compare
@matthunz sorry I did not see your changes before I force pushed my updates, because I found an issue. Please re-apply your updates you had done before, or just recommend them and I can add them. @ealmloff your changes in cda8bb2#diff-517df2174967af5678c41e224b2d9a1f1e63e7fcdfe46bc4108c14bdf4defff2R25 broke Given the last bit, I am not sure if this needs a larger set of changes to all the events, or if this is fine for now, or what. Please advise. |
Yes, applying that change to all events would be great. Many people will be downcasting to the web-sys counterpart from previous releases, so if we can not change the type it downcasts to that is better |
Oh my fault I didn't mean to get in the way @rogusdev I just re-applied those changes I hope that's all good. I also added your fix for downcasting to all other events |
@matthunz thanks! Your cleanup looks |
@matthunz I re-added the web_sys event reference for the drag.rs as_any-s because those got lost with the re-applying of the old commit |
I also notice that web/events/mouse has these tidbits: impl HasFileData for Synthetic<MouseEvent> {}
impl HasDragData for Synthetic<MouseEvent> {
fn as_any(&self) -> &dyn std::any::Any {
&self.event
}
} Perhaps these were just because of the old dragevent implementation and we can get rid of these now?... I suspect they are vestigial now, and only added before for the slightly inaccurate previous structure of things, bc MDN does not mention files or drag anything for mouseevent: https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent |
Ah man I totally missed that thanks! |
Awesome! (: it looks like we might have a CI issue - looks like some links in various READMEs aren’t loading correctly for the runner |
Do you want to approve for me to merge as-is and you fix the readmes separately? |
Thanks, this looks much better. The readme links should be fixed automatically when the docsite is back to normal |
Resolves #3133 maybe?