dpitois / liquid-select-focus-bug

Reproduction of an issue when using LdSelect with filter on does not always take the focus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Liquid + React + Typescript + Tailwind CSS

This template should help get you started developing with Liquid Oxygen and React using Typescript and Tailwind CSS.

About

This repo reproduces an weird bug on LdSelect focus which does not always occures:

Repro steps

  1. Clone the repo
  2. Install dependencies
  3. Run the application
  4. Click on the 1st LdSelect of the form

Expected behavior

The focus should always be done.

Current behavior

Sometime, the focus is not done, and the bug can be observed when user clicks quickly on the LdSelect.
Above the input, a custom element <ClickLogger /> logs time between mousedown and mouseup event, and most of the time when the bug occures, this duration is around 40ms.

About

Reproduction of an issue when using LdSelect with filter on does not always take the focus


Languages

Language:TypeScript 96.7%Language:HTML 1.8%Language:JavaScript 1.2%Language:CSS 0.3%