Skip to content

Commit fe39245

Browse files
authored
Merge pull request #7167 from nextcloud-libraries/fix/input-field-search
fix(NcInputField): remove browser injected clear button
2 parents df13161 + 0419aad commit fe39245

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/components/NcInputField/NcInputField.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,20 @@ function handleInput(event: Event) {
345345
color: var(--color-text-maxcontrast);
346346
}
347347
348+
// prevent Blink and WebKit to add an additional button when type is set to search
349+
// we have our properly styled trailing button anyways.
350+
&::-webkit-search-cancel-button {
351+
// its a weird bug in Blink that this rule must not be grouped with the other selectors below.
352+
// otherwise it is not recognized by Blink
353+
display: none;
354+
}
355+
&::-webkit-search-decoration,
356+
&::-webkit-search-results-button,
357+
&::-webkit-search-results-decoration,
358+
&::-ms-clear {
359+
display: none;
360+
}
361+
348362
&:active:not([disabled]),
349363
&:hover:not([disabled]),
350364
&:focus:not([disabled]) {

0 commit comments

Comments
 (0)