Skip to content

Commit

Permalink
fix: 🐛 fix clicking the toolbar menu is detected as blur event
Browse files Browse the repository at this point in the history
  • Loading branch information
luthfimasruri committed Mar 20, 2021
1 parent 21b8fdd commit 43fa320
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/QuillEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ export default defineComponent({
// Remove editor class when theme changes
if (props.theme !== "bubble") editor.value.classList.remove("ql-bubble");
if (props.theme !== "snow") editor.value.classList.remove("ql-snow");
// Fix clicking the quill toolbar is detected as blur event
quill.getModule("toolbar")?.container.addEventListener("mousedown", (e) => {
e.preventDefault();
});
// Emit ready event
ctx.emit("ready", quill);
}
Expand Down

0 comments on commit 43fa320

Please sign in to comment.