Open Bug 1719286 Opened 3 years ago Updated 3 years ago

MouseEvent on <select> does not always recognize that the control key is down

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

Firefox 90
defect

Tracking

()

UNCONFIRMED

People

(Reporter: Igloo.haa, Unassigned)

Details

(Keywords: parity-chrome, parity-edge)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0

Steps to reproduce:

  1. Open a web page with a <select> tag (or create your own)
  2. Make sure to add multiple <option>s in it
  3. Add a click event listener on the select element that logs to the console MouseEvent.ctrlKey
  4. Click on the select tag multiple times, with and without pressing the ctrl key
  5. Watch the results, the ctrl key is not always detected as it should.

Actual results:

When the ctrlKey is not down, the MouseEvent.ctrlKey field is always false, as expected.
But when the ctrlKey is down, then it is not always detected and the MouseEvent.ctrlKey field is not always right.

I may be wrong but it seems that the control key is not detected when the dropdowns opens.

Expected results:

When the control key is down, then the MouseEvent.ctrlKey field should be true.
Otherwise, it should be false (and that is already correct).

The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core
Attached file test.html

If the mouse click happens on dropdown menu to select an option, then it seems we don't report control key on the click event.
I also test on Chrome and Edge,

  • Chrome doesn't report control key even if the mouse click happens on select element to open the dropdown menu.
  • Edge behave the same as us.
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: