8000 fix: don't submit form when search clear button clicked by davwheat · Pull Request #3260 · flarum/framework · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: don't submit form when search clear button clicked #3260

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. 8000

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

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

davwheat
Copy link
Member
@davwheat davwheat commented Jan 11, 2022

Changes proposed in this pull request:

When search component is inside a modal or similar DOM hierarchy with a form, the form is submitted inadvertently.

Button must have type=button in order to prevent it triggering a SubmitEvent.

Reviewers should focus on:

Screenshot

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

@davwheat davwheat added this to the 1.3 milestone Jan 11, 2022
@davwheat davwheat self-assigned this Jan 11, 2022
Copy link
Member
@askvortsov1 askvortsov1 left a comment

Choose a reason for hiding this comment

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

LGTM, could you rebase so that CI passes?

@askvortsov1 askvortsov1 requested a review from SychO9 February 2, 2022 21:07
@luceos
Copy link
Member
luceos commented Feb 21, 2022

Please fix CI @davwheat so that we can merge 👍

@davwheat davwheat force-pushed the dw/search-fix-form-submit branch from 282f07b to 50e7174 Compare February 21, 2022 10:53
@davwheat davwheat merged commit b58b3e2 into master Feb 21, 2022
@davwheat davwheat deleted the dw/search-fix-form-submit branch February 21, 2022 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0