fixes to entries (#6464)

* fixes to entries
fix delete first notebook entry
fix select unfocused on create
* do not blur if nothing is focused
This commit is contained in:
David Tsay
2023-03-17 15:14:15 -07:00
committed by GitHub
parent 201c669328
commit 453b1f3009
2 changed files with 21 additions and 9 deletions

View File

@@ -54,7 +54,7 @@
class="c-ne__remove c-icon-button c-icon-button--major icon-trash"
title="Delete this entry"
tabindex="-1"
@click="deleteEntry"
@click.stop.prevent="deleteEntry"
>
</button>
</span>
@@ -466,7 +466,10 @@ export default {
if (!this.isSelectedEntry) {
$event.preventDefault();
// blur the previous focused entry if clicking on non selected entry input
document.activeElement.blur();
const focusedElementId = document.activeElement?.id;
if (focusedElementId !== this.entry.id) {
document.activeElement.blur();
}
}
},
editingEntry() {