Skip to content

fix: do not hide caret when input is empty - #3779

Merged
web-padawan merged 1 commit into
masterfrom
fix/mscb-show-caret
May 4, 2022
Merged

web-padawan merged 1 commit into
masterfrom
fix/mscb-show-caret

Conversation

@web-padawan

Copy link
Copy Markdown
Member

Description

Currently, <vaadin-multi-select-combo-box> uses the following styles to hide placeholder text when value is set:

:host([has-value]) ::slotted(input:placeholder-shown) {
color: transparent !important;
}

This is especially useful because placeholder in this case is used for screen reader announcement of selected items.

However, this currently causes the problem of making the cursor caret hidden when focusing empty input.
This PR adds the styles for enforcing caret-color to Lumo and Material, to make the caret visible again.

Type of change

  • Bugfix

@sonarqubecloud

sonarqubecloud Bot commented May 4, 2022

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tomivirkki

Copy link
Copy Markdown
Member

Would it work if the placeholder was hidden with ::placeholder selector instead?

@web-padawan

Copy link
Copy Markdown
Member Author

Would it work if the placeholder was hidden with ::placeholder selector instead?

I haven't tested, but we don't use ::placeholder at the moment because it does not work with ::slotted() in Safari.

@web-padawan
web-padawan removed the request for review from DiegoCardoso May 4, 2022 13:39
@web-padawan
web-padawan merged commit f85196f into master May 4, 2022
@web-padawan
web-padawan deleted the fix/mscb-show-caret branch May 4, 2022 13:40
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.

2 participants