diff --git a/components/Editor/Editor.vue b/components/Editor/Editor.vue
index fd136e770..07b904564 100644
--- a/components/Editor/Editor.vue
+++ b/components/Editor/Editor.vue
@@ -2,6 +2,7 @@
@@ -23,7 +27,8 @@
size="small"
:hover="isActive.bold()"
ghost
- @click.prevent="commands.bold"
+ @click.prevent="() => {}"
+ @mousedown.native.prevent="commands.bold"
>
@@ -33,7 +38,8 @@
size="small"
:hover="isActive.italic()"
ghost
- @click.prevent="commands.italic"
+ @click.prevent="() => {}"
+ @mousedown.native.prevent="commands.italic"
>
@@ -43,7 +49,8 @@
size="small"
:hover="isActive.link()"
ghost
- @click="showLinkMenu(getMarkAttrs('link'))"
+ @click.prevent="() => {}"
+ @mousedown.native.prevent="showLinkMenu(getMarkAttrs('link'))"
>
@@ -214,16 +221,6 @@ export default {
}
}
},
- mounted() {
- const keydownListener = document.addEventListener('keydown', e => {
- if (this.linkMenuIsActive && e.keyCode === 27) {
- this.hideLinkMenu()
- }
- })
- this.$once('hook:beforeDestroy', () => {
- document.removeEventListener('keydown', keydownListener)
- })
- },
beforeDestroy() {
this.editor.destroy()
},
@@ -250,6 +247,11 @@ export default {
hideLinkMenu() {
this.linkUrl = null
this.linkMenuIsActive = false
+ this.editor.focus()
+ },
+ hideMenu(isActive) {
+ isActive = false
+ this.hideLinkMenu()
},
setLinkUrl(command, url) {
command({ href: url })
@@ -336,6 +338,12 @@ li > p {
.tooltip-arrow {
left: calc(50% - 10px);
}
+
+ input,
+ button {
+ border: none;
+ border-radius: 2px;
+ }
}
// p:not(.is-empty) {