Skip to content

Commit 033d0e1

Browse files
committed
fix focus issue
1 parent 85999e8 commit 033d0e1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/Popup/MainBody.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ export default Vue.extend({
6969
};
7070
},
7171
computed,
72-
mounted: function () {
73-
document.querySelector<HTMLLinkElement>(".entry[tabindex='0']")?.focus();
74-
},
7572
methods: {
7673
isMatchedEntry(entry: OTPEntry) {
7774
for (const hash of this.$store.getters["accounts/matchedEntries"]) {

src/popup.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ async function init() {
7171
}
7272
}
7373

74+
// Auto focus on first entry
75+
document.querySelector<HTMLAnchorElement>("a.entry[tabindex='0']")?.focus();
76+
7477
// Set document title
7578
try {
7679
document.title = instance.i18n.extName;

0 commit comments

Comments
 (0)