There was an error while loading. Please reload this page.
1 parent c5bb63c commit 9075205Copy full SHA for 9075205
1 file changed
src/components/MenuBar.vue
@@ -185,6 +185,7 @@ export default {
185
submenuVisibility: {},
186
lastImagePath: null,
187
icons: [...menuBarIcons],
188
+ editorHasFocus: false
189
}
190
},
191
computed: {
@@ -209,7 +210,7 @@ export default {
209
210
211
212
isVisible() {
- return this.$editor.isFocused
213
+ return this.editorHasFocus
214
|| Object.values(this.submenuVisibility).find((v) => v)
215
216
disabled() {
@@ -278,6 +279,14 @@ export default {
278
279
280
}, 100)
281
this.$emit('update:loaded', true)
282
+
283
+ this.$editor.on('focus', _ => {
284
+ this.editorHasFocus = true
285
+ })
286
287
+ this.$editor.on('blur', _ => {
288
+ this.editorHasFocus = false
289
290
291
beforeDestroy() {
292
window.removeEventListener('resize', this.getWindowWidth)
0 commit comments