Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,11 @@
};

onMounted(() => {
// capture
document.addEventListener('click', handleClickOutside, true);
document.addEventListener('click', handleClickOutside);
});

onUnmounted(() => {
document.removeEventListener('click', handleClickOutside, true);
Comment on lines -186 to -191
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to remove this last true so that the event listener triggered the handler on the event bubble instead of doing so on the event capture phase; this leaves us space to call .stopPropagation on nodes outside the tiptap editor DOM tree (e.g., KDropdown renders the dropdown in a different dropdown layer). I have tested this extensively and haven't found any unexpected regression.

document.removeEventListener('click', handleClickOutside);
});

const getMarkdownContent = () => {
Expand Down
Loading
Loading