Skip to content

Only e.preventDefault when Dropdown is active - #307

Merged
nmanu1 merged 4 commits into
developfrom
dev/limit-prevent-default
Sep 22, 2022
Merged

nmanu1 merged 4 commits into
developfrom
dev/limit-prevent-default

Conversation

@nmanu1

@nmanu1 nmanu1 commented Sep 21, 2022

Copy link
Copy Markdown
Contributor

Update the Dropdown component to only call e.preventDefault for the up/down arrow keys if the dropdown is active.

J=SLAP-2351
TEST=manual

Spin up the test-site, load results, and see that the up and down arrow keys scroll the page when the dropdown is closed. When the dropdown is active, up/down arrows work as expected to navigate through dropdown options. Tested both the SearchBar and FilterSearch dropdowns.

@nmanu1
nmanu1 requested a review from a team as a code owner September 21, 2022 15:29
@coveralls

coveralls commented Sep 21, 2022 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.1%) to 85.356% when pulling 04c09ba on dev/limit-prevent-default into 7a139fb on develop.

@github-actions

github-actions Bot commented Sep 21, 2022 •

Copy link
Copy Markdown
Contributor

Current unit coverage is 88.49693251533742%
Current visual coverage is 77.40899357601712%
Current combined coverage is 89.03374233128834%

Comment thread src/components/Dropdown/Dropdown.tsx Resolved
Comment thread src/components/Dropdown/Dropdown.tsx Resolved
@nmanu1
nmanu1 merged commit 61abcdb into develop Sep 22, 2022
@nmanu1
nmanu1 deleted the dev/limit-prevent-default branch September 22, 2022 12:49
@tmeyer2115 tmeyer2115 mentioned this pull request Dec 15, 2022
tmeyer2115 added a commit that referenced this pull request Dec 15, 2022
### Features
- Default behavior of `FilterSearch` was changed to better support Locators and Doctor Finders. Additionally, a new `onSelect` prop was added to the Component. The `searchOnSelect` prop is now deprecated.  (#323, #343, #333)
- A new CSS bundle without the Tailwind resets is exported. (#322)
- We've added a `MapboxMap` Component, powered by v2 of their JavaScript API. (#332)

### Changes
- Assorted updates to improve our GH Actions. 
- Styling of Facet Headers is now exposed in `FilterGroupCssClasses`. (#321)

### Bug Fixes
- Vulnerabilities were addressed for the repo and its test-site. 
- Fixed the Dropdown Component to invoke `preventDefault` only when it is active. (#307)
- Corrected a small error in the generation of SSR Hydration IDs. (#315)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants