Is there a way to change the color of an input field when it's focused? Currently, it turns grey only when focused by a function and remains so until typing or clicking on the field.
export function autofocus() {
let blanks = document.querySelectorAll(".blank")
let textfield = document.getElementById("textfield")
if (blanks.length > 0) {
document.querySelectorAll(".blank")[0].setFocus()
}
else if (textfield) {
document.getElementById("textfield").setFocus()
}
}
https://i.sstatic.net/2gaGR.png
The responsible class is:
:host(.ion-focused) .item-native::after {
background: var(--background-focused);
opacity: var(--background-focused-opacity);
}
Unfortunately, this is part of the Shadow DOM. Does anyone know how to solve this issue? The opacity should ideally be set to zero.