Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: middle click should close tab even if there is scroll

Abdullah Attad96a78c74141
diff --git a/apps/web/src/components/editor/action-bar.tsx b/apps/web/src/components/editor/action-bar.tsx
index 5e2fefe8b..0dfd8a51d 100644
--- a/apps/web/src/components/editor/action-bar.tsx
+++ b/apps/web/src/components/editor/action-bar.tsx
@@ -462,8 +462,11 @@ function Tab(props: TabProps) {
e.stopPropagation();
if (isTemporary) onKeepOpen();
}}
- onAuxClick={(e) => {
- if (e.button == 1) onClose();
+ onMouseDown={(e) => {
+ if (e.button == 1) {
+ e.preventDefault();
+ onClose();
+ }
}}
onClick={(e) => {
e.stopPropagation();