mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 18:58:12 +08:00
Clean up Vue component refs (#813)
* Clean up Vue component refs * Second pass of code improvements
This commit is contained in:
@@ -84,8 +84,8 @@ export default defineComponent({
|
||||
},
|
||||
mounted() {
|
||||
// Focus the first button in the popup
|
||||
const element = this.$el as Element | undefined;
|
||||
const emphasizedOrFirstButton = (element?.querySelector("[data-emphasized]") || element?.querySelector("[data-text-button]") || undefined) as HTMLButtonElement | undefined;
|
||||
const dialogModal: HTMLDivElement | undefined = this.$el;
|
||||
const emphasizedOrFirstButton = (dialogModal?.querySelector("[data-emphasized]") || dialogModal?.querySelector("[data-text-button]") || undefined) as HTMLButtonElement | undefined;
|
||||
emphasizedOrFirstButton?.focus();
|
||||
},
|
||||
components: {
|
||||
|
||||
Reference in New Issue
Block a user