listbox with transition suffers from race condition. When “enter” click, handler for keyPress is called – is sets flag isOpen to true.
Then after a while, the handleronButtonClick is also fired – this handler toggles isOpen property – so it reverts isOpen to false.
Everything above is executed on one “enter” click.
What changed and why:
Currently when using
<Listbox/>
component with composition with<Transtion/>
it is not possible to use "Enter" key to open listbox.Video from demo (try yourself):
https://user-images.githubusercontent.com/11621383/170680518-49a03b85-e6c0-43d9-a1dd-b2b39e429278.mp4
Fix:
listbox with transition suffers from race condition. When “enter” click, handler for
keyPress
is called – is sets flagisOpen
to true. Then after a while, the handleronButtonClick
is also fired – this handler togglesisOpen
property – so it revertsisOpen
to false. Everything above is executed on one “enter” click.link to failed test.