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

fix(Select): set trigger type to button to prevent submits #1843

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

booc0mtaco
Copy link
Contributor

Summary:

  • when a button is in a form tag, it automatically becomes able to submit
  • our wrapper doesn't include this which is usually fine
  • sometimes during a slow load, the handler preventing propagation allows submit
  • fixing this by adding a non-editable type

Test Plan:

  • Wrote automated tests
  • CI tests / new tests are not applicable
  • Manually tested my changes, but I want to keep the details secret
  • Manually tested my changes, and here are the details:
    • verify trigger buttons include type in snapshots

- when a button is in a form tag, it automatically becomes able to submit
- our wrapper doesn't include this which is usually fine
- sometimes during a slow load, the handler preventing propagation allows submit
- fixing this by adding a non-editable type
@booc0mtaco booc0mtaco requested a review from a team February 8, 2024 00:15
Copy link

github-actions bot commented Feb 8, 2024

size-limit report 📦

Path Size
components 98.03 KB (+0.01% 🔺)
styles 39.81 KB (0%)

@booc0mtaco
Copy link
Contributor Author

It looks like the tag properly includes this attribute, but since its related to some racing condition, not exactly sure we can get a failing state to appear

@ghost
Copy link

ghost commented Feb 8, 2024

It looks like the tag properly includes this attribute, but since its related to some racing condition, not exactly sure we can get a failing state to appear

Yeah there's not really a ticket with "steps to reproduce". The fix seems good though

@booc0mtaco booc0mtaco merged commit d7ea037 into next Feb 8, 2024
8 checks passed
@booc0mtaco booc0mtaco deleted the aholloway/EFI-1616 branch February 8, 2024 16:40
@booc0mtaco booc0mtaco mentioned this pull request Feb 20, 2024
booc0mtaco added a commit that referenced this pull request Feb 20, 2024
## [13.11.0](v13.11.0-alpha.0...v13.11.0) (2024-02-20)

[Storybook](https://61313967cde49b003ae2a860-xfzakymyle.chromatic.com/)

### Features

* **script:** add import from figma script ([#1844](#1844)) ([9ed90e5](9ed90e5))
* **Select:** enable multi-select ([ced70d5](ced70d5))
* **Select:** add handling for long text in select field ([7c79a6e](7c79a6e))

### Bug Fixes

* **PopoverListItem:** adjust size of list item when selected ([0496f56](0496f56))
* **Select:** set trigger type to button to prevent submits ([#1843](#1843)) ([d7ea037](d7ea037))
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.

1 participant