Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't capture non-left mouse clicks on combobox #1216

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

mike-mike-mike-mike-mike
Copy link
Contributor

@mike-mike-mike-mike-mike mike-mike-mike-mike-mike commented Dec 22, 2023

APT-1372

Right-clicking on a combobox input or menu option should not behave like a left click. this commit skips the custom mouse down handling if not left-click. Impetus for this change is the use of combobox within our bulk-uploader component. The cells of the table each have a custom right-click menu, but when a user right clicks on a cell that contains a combobox, both the right-click menu and the combobox dropdown appear, which is not desired (see video below)

Before:

combobox.capturing.right.click.mov

After:

combobox.not.capturing.right.click.mov

Reason for change:

reason.for.combox.change.mov

@mike-mike-mike-mike-mike mike-mike-mike-mike-mike marked this pull request as draft January 23, 2024 20:35
@mike-mike-mike-mike-mike mike-mike-mike-mike-mike force-pushed the lamboFixComboboxRightClickHandling branch from d0780af to cbaca10 Compare January 23, 2024 22:39
@mike-mike-mike-mike-mike mike-mike-mike-mike-mike marked this pull request as ready for review January 23, 2024 22:39
Copy link

@jovan-appfolio jovan-appfolio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good. Are there any updates to tests that could be made in this file:
src/components/Combobox/Combobox.spec.js?

@mike-mike-mike-mike-mike mike-mike-mike-mike-mike force-pushed the lamboFixComboboxRightClickHandling branch 2 times, most recently from b98a79e to 1efc60b Compare January 24, 2024 18:15
Copy link

@jovan-appfolio jovan-appfolio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mike-mike-mike-mike-mike mike-mike-mike-mike-mike force-pushed the lamboFixComboboxRightClickHandling branch from 1efc60b to cddfcd2 Compare January 24, 2024 18:30
Right-clicking on a combobox input or menu option should
not behave like a left click. this commit skips the
custom mouse down handling if not left-click.
@mike-mike-mike-mike-mike mike-mike-mike-mike-mike force-pushed the lamboFixComboboxRightClickHandling branch from cddfcd2 to 319627a Compare January 26, 2024 00:18
@mike-mike-mike-mike-mike mike-mike-mike-mike-mike changed the base branch from master to apt-reactstrapDropdownFix January 26, 2024 00:18
Copy link
Contributor

Released prerelease version 8.10.3-lamboFixComboboxRightClickHandling-6bebce0.0.
You may now run npm install @appfolio/react-gears@lamboFixComboboxRightClickHandling

Base automatically changed from apt-reactstrapDropdownFix to master January 26, 2024 22:17
@elbaar elbaar merged commit 8c50b2a into master Jan 26, 2024
2 checks passed
@elbaar elbaar deleted the lamboFixComboboxRightClickHandling branch January 26, 2024 22:17
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