fix: same position right click menu visable bug

This commit is contained in:
hlwwlh 2020-07-19 14:49:37 +00:00
parent aade1445bc
commit 3151c4fe99

View File

@ -52,7 +52,7 @@ const mutations = {
state.currentColor = data; state.currentColor = data;
localStorage.setItem('color', data) localStorage.setItem('color', data)
}, },
setRightClickMenuVisible(state,data){ setRightClickMenuVisible(state,data) {
state.rightClickMenuVisible = data; state.rightClickMenuVisible = data;
}, },
themeChanged(state) { themeChanged(state) {
@ -98,13 +98,13 @@ const mutations = {
state.editor.setValue(doc) state.editor.setValue(doc)
} }
state.editor.on("cursorActivity",function(){ state.editor.on('mousedown', function() {
state.rightClickMenuVisible = false state.rightClickMenuVisible = false
}); });
state.editor.on("blur",function(){ state.editor.on('blur', function() {
state.rightClickMenuVisible = false state.rightClickMenuVisible = false
}); });
state.editor.on("scroll",function(){ state.editor.on('scroll', function() {
state.rightClickMenuVisible = false state.rightClickMenuVisible = false
}); });