Skip to content

Commit ed80a66

Browse files
committed
remove next tick from focus management
1 parent 4dd641a commit ed80a66

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

kolibri/plugins/epub_viewer/assets/src/views/SettingsSideBar.vue

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@
208208
},
209209
mounted() {
210210
this.customThemes = Lockr.get('kolibriEpubRendererCustomThemes') || {};
211-
this.$nextTick(() => {
212-
// if (this.$refs.addCustomThemeButton && this.$refs.addCustomThemeButton.$refs.button) {
213-
// this.$refs.addCustomThemeButton.$refs.button.focus();
214-
// }
215-
console.log('hello world from mount function');
216-
});
211+
// this.$nextTick(() => {
212+
// // if (this.$refs.addCustomThemeButton && this.$refs.addCustomThemeButton.$refs.button) {
213+
// // this.$refs.addCustomThemeButton.$refs.button.focus();
214+
// // }
215+
// console.log('hello world from mount function');
216+
// });
217217
},
218218
methods: {
219219
generateThemeAriaLabel(themeName) {
@@ -267,12 +267,13 @@
267267
if (themeName === this.theme.name) {
268268
this.$emit('setTheme', this.themes.WHITE); // apply the default theme
269269
}
270-
this.$nextTick(() => {
271-
console.log('hello world');
272-
// if (this.$refs.addCustomThemeButton && this.$refs.addCustomThemeButton.$refs.button) {
273-
// this.$refs.addCustomThemeButton.$refs.button.focus();
274-
// }
275-
});
270+
this.$refs.addCustomThemeButton.$refs.button.focus();
271+
// this.$nextTick(() => {
272+
// console.log('hello world');
273+
// if (this.$refs.addCustomThemeButton && this.$refs.addCustomThemeButton.$refs.button) {
274+
// this.$refs.addCustomThemeButton.$refs.button.focus();
275+
// }
276+
// });
276277
},
277278
},
278279
$trs: {

0 commit comments

Comments
 (0)