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

Prevent fields from toggling open when cleared #6032

Closed

Conversation

domstubbs
Copy link

Currently when the _handleClear event fires the field will be closed if it was opened (👍) and opened if it was previously closed (👎). I can think of no reason why anyone would want both of those to be the case, and in most cases I expect it would be undesirable to have fields automatically opening when they’re cleared.

Anyone that wants to select a different option can already click in any other part of the field to open it up and select a new value – someone that clicks the clear button is explicitly choosing not to do that.

This is discussed in #3320 and clearly a lot of people feel the same way. I appreciate the request was denied before, but I thought I’d submit a very clean/simple PR before resorting to a nasty local hack in my project.

This pull request includes a

  • Bug fix
  • New feature
  • Translation

The following changes were made

  • The mouse clear event will no longer open a closed field.

There is no reason to assume the user wants to open the field when they
hit the clear button. If the field is open when the clear button is
selected it will be closed as normal.
@stale
Copy link

stale bot commented Jul 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label Jul 13, 2021
@stale stale bot closed this Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant