Item pane header: Use focused getter instead of :focus-within

:focus-within doesn't match when the window is inactive but the field
is focused.

Addresses #4101, except that focusing the new item's title field and
pressing Escape will clear the field (without modifying the item).
This commit is contained in:
Abe Jellinek 2024-05-16 11:07:15 -04:00
parent c7159a5fa6
commit b4c5c5d539

View file

@ -179,7 +179,7 @@
}
async blurOpenField() {
if (this.titleField?.matches(':focus-within')) {
if (this.titleField.focused) {
this.titleField.blur();
await this.save();
}