Skip to content

Button order for MouseEvent.button vs MouseEvent.buttons very easy to miss #390

@CendioOssman

Description

@CendioOssman

For what I assume historical reasons, MouseEvent.button and MouseEvent.buttons do not order buttons in the same way. The second and third button switch meaning between the two attributes.

This is very easy to overlook, so I think a warning note would be very useful.

(If MDN could also get a warning, then that would be fantastic)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions