Skip to content

Commit

Permalink
fix(#125): slash buttons not clickable
Browse files Browse the repository at this point in the history
fix: #125
  • Loading branch information
BearToCode committed Oct 18, 2024
1 parent cb175e1 commit f4ba514
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/plugin-slash/src/lib/Slash.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,20 @@
carta.input?.textarea.addEventListener('keydown', handleKeyDown);
carta.input?.textarea.addEventListener('keyup', handleKeyUp);
carta.input?.textarea.addEventListener('click', hide);
carta.input?.textarea.addEventListener('blur', hide);
carta.input?.textarea.addEventListener('blur', hideWithDelay);
});
onDestroy(() => {
carta.input?.textarea.removeEventListener('keydown', handleKeyDown);
carta.input?.textarea.removeEventListener('keyup', handleKeyUp);
carta.input?.textarea.removeEventListener('click', hide);
carta.input?.textarea.removeEventListener('blur', hide);
carta.input?.textarea.removeEventListener('blur', hideWithDelay);
});
function hideWithDelay() {
setTimeout(hide, 100);
}
function hide() {
visible = false;
}
Expand Down

0 comments on commit f4ba514

Please sign in to comment.