fix: the panel layer swallows mouse events meant for it

Co-Authored-By: Ovis Fast (Claude) <[email protected]>
This commit is contained in:
FactorandOvis Fast committed 2026-11-19 20:19:32 +01:00
1 parent f379b9470c
commit a4c7f25307
1 file changed
+6
@@ -2666,6 +2666,12 @@ export default class Composer extends View {
.inset_0() .inset_0()
.p(6) .p(6)
.bg(t.canvas) .bg(t.canvas)
// Mouse events reach every element under the pointer: without these the
// press that lands on the panel would also reach the bar under it
// (e.g. open the "New button" form). Children get the event first.
.on_mouse_down("left", (event, cx) => cx.stop_propagation())
.on_mouse_down("right", (event, cx) => cx.stop_propagation())
.on_click((event, cx) => cx.stop_propagation())
.child( .child(
renderPanel(t, this.panelView(), { renderPanel(t, this.panelView(), {
key: (event, cx) => this.panelKey(event, cx), key: (event, cx) => this.panelKey(event, cx),