JedWatson / JedWatson/react-select

Clicking on the dropdown field does not fire onClick events added to window when on mobile

Open
#5,481 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-confirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Description of the issue:

When on mobile (either a real device or simulated with Chrome Dev Tools) click events aren't triggered when clicking on the dropdown input.

Steps to reproduce the issue:

  1. Go to: https://react-select.com/home (because any dropdown from react-select will work for that)
  2. Open DevTools, go to Console and type in window.addEventListener('click', () => console.log('clicked'));
  3. Click on the icon found in the top left corner to simulate a mobile device
  4. Click on a dropdown - no log will be visible in the console

Clicking someplace else or disabling mobile device simulation will produce logs after clicking on the dropdown.

Expected result:

When on mobile, a click on the dropdown input should produce a log in the console. The log is just an example, of course.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue from the react-select.com/home entry point using Chrome DevTools mobile emulation and the window click listener shown in the report. Trace the dropdown input's event handling and verify that clicking it produces the expected console log without changing behavior elsewhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.