Skip to content

Commit

Permalink
Link to W3C instead of editors draft in web mouse button handling
Browse files Browse the repository at this point in the history
Co-authored-by: daxpedda <daxpedda@gmail.com>
  • Loading branch information
bbb651 and daxpedda committed Jun 2, 2023
1 parent 6394ed3 commit 39625b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform_impl/web/web_sys/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::convert::TryInto;
use web_sys::{HtmlCanvasElement, KeyboardEvent, MouseEvent, PointerEvent, WheelEvent};

pub fn mouse_button(event: &MouseEvent) -> MouseButton {
// https://w3c.github.io/uievents/#dom-mouseevent-button
// https://www.w3.org/TR/uievents/#dom-mouseevent-button
match event.button() {
0 => MouseButton::Left,
1 => MouseButton::Middle,
Expand Down

0 comments on commit 39625b7

Please sign in to comment.