fix(electrobun): remove drag-region div that captured all clicks on WebKitGTK

This commit is contained in:
Hibryda 2026-03-20 06:45:38 +01:00
parent d95cf122f0
commit fe441a86fe
4 changed files with 9 additions and 18 deletions

View file

@ -4,8 +4,8 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Svelte App</title>
<script type="module" crossorigin src="/assets/index-CcWCxrMp.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-B2TjuJxL.css">
<script type="module" crossorigin src="/assets/index-OTfWrRGk.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DsPvEluY.css">
</head>
<body>
<div id="app"></div>

View file

@ -312,11 +312,8 @@
</button>
</aside>
<!-- Main workspace -->
<!-- Main workspace — no drag region (WebKitGTK captures clicks incorrectly) -->
<main class="workspace">
<!-- Draggable region at top of workspace (no title bar chrome) -->
<div class="drag-region" aria-hidden="true"></div>
<!-- Project grid -->
<div class="project-grid" role="list" aria-label="{activeGroup?.name ?? 'Projects'} projects">
{#each gridRows() as row (row.type === 'standalone' ? row.project.id : `cg-${row.parent.id}`)}
@ -515,6 +512,8 @@
padding: 1rem 0;
user-select: none;
flex-shrink: 0;
-webkit-app-region: drag; /* Only AGOR title is draggable — safe, small area */
cursor: grab;
}
.sidebar-groups {
@ -609,21 +608,13 @@
overflow: hidden;
}
/* Invisible draggable region at top of workspace */
.drag-region {
height: 2.25rem;
flex-shrink: 0;
-webkit-app-region: drag;
background: var(--ctp-crust);
border-bottom: 1px solid var(--ctp-surface0);
}
/* ── Project grid ─────────────────────────────────────────── */
.project-grid {
flex: 1;
min-height: 0;
display: grid;
grid-template-columns: 1fr 1fr;
grid-auto-rows: 1fr; /* equal rows that fill available height */
gap: 0.5rem;
padding: 0.5rem;
background: var(--ctp-crust);