Skip to content

Spacebar in text input causes click event #39028

@MichaelMcDonnell

Description

@MichaelMcDonnell

Describe the bug:
Typing a space with the spacebar in a text input causes a click event.

To Reproduce:

  1. Open my example which is a text input with an onclick listener that logs a message to the console.
  2. Open Servo from a terminal.
  3. Click in the text input and notice the message "Got onclick" in the terminal.
  4. Type one or more spaces using the spacebar.
  5. Notice in the terminal that "Got onclick" is printed every time spacebar is pressed.

Firefox and Chromium do not get the click event when spacebar is pressed. I checked it using their developer tools.

Platform:
Linux, Fedora 42, Framework Laptop 13 AMD Ryzen 7040Series

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions