dhis2 / ui

Components and related resources for the DHIS2 design system
https://ui.dhis2.nu
BSD 3-Clause "New" or "Revised" License
40 stars 15 forks source link

fix(drop-down): dont swallow keyDown events unless its esc and open #1529

Closed Birkbjo closed 4 months ago

Birkbjo commented 4 months ago

Fixes https://dhis2.atlassian.net/browse/LIBS-627


Description

event.preventDefault() was called for every keyDown event on the document. This resulted in swallowed keydown events, and made inputFields not work at all.

I tried to add a test, but was not able to make it "fail" with the previous implementation. Eg. when I did fireEvent.keyDown, the value of the input-field was correct - but in reality it's not working.

Checklist

dhis2-bot commented 4 months ago

🚀 Deployed on https://pr-1529--dhis2-ui.netlify.app

dhis2-bot commented 4 months ago

:tada: This PR is included in version 9.8.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: