Skip to content

fix: do not clear on Esc with clear button visible when readonly - #8455

Merged
web-padawan merged 2 commits into
mainfrom
fix/clear-button-readonly
Jan 8, 2025
Merged

web-padawan merged 2 commits into
mainfrom
fix/clear-button-readonly

Conversation

@web-padawan

Copy link
Copy Markdown
Member

Description

Fixes #8448

  • Added missing logic and tests to check readonly property before clearing value on Esc
  • Refactored ComboBoxMixin listener to remove duplication and only check for readonly once

Type of change

  • Bugfix

Note

Ideally this change would require moving readonly property to ClearButtonMixin since it's now used there.
However we already have some problems with mixins structure since e.g. ComboBoxMixin and DatePickerMixin technically use clearButtonVisible while not extending ClearButtonMixin. So maybe we can keep it as is for now.

Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
@sonarqubecloud

sonarqubecloud Bot commented Jan 8, 2025

Copy link
Copy Markdown

@web-padawan
web-padawan removed the request for review from vursen January 8, 2025 14:57
@web-padawan
web-padawan merged commit 76ba241 into main Jan 8, 2025
@web-padawan
web-padawan deleted the fix/clear-button-readonly branch January 8, 2025 14:59
web-padawan added a commit that referenced this pull request Jan 8, 2025
…) (#8458)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request Jan 8, 2025
…) (#8459)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request Jan 9, 2025
…) (#8460)

Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 24.7.0.alpha3 and is also targeting the upcoming stable 24.7.0 version.

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.

Using the ESC key you can clear the selected value of a Vaadin combo-box with 'readonly', 'clear-button-visible' and 'has-value' properties

3 participants