Skip to content
Merged
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
18 changes: 18 additions & 0 deletions src/renderer/core/canvas/useCanvasInteractions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ export function useCanvasInteractions() {
* when appropriate (e.g., Ctrl+wheel for zoom in standard mode)
*/
const handleWheel = (event: WheelEvent) => {
// Check if the wheel event is from an element that wants to capture wheel events
const target = event.target as HTMLElement
const captureElement = target?.closest('[data-capture-wheel="true"]')

if (captureElement) {
// Element wants to capture wheel events, don't forward to canvas
return
}

// In standard mode, Ctrl+wheel should go to canvas for zoom
if (isStandardNavMode.value && (event.ctrlKey || event.metaKey)) {
forwardEventToCanvas(event)
Expand Down Expand Up @@ -72,6 +81,15 @@ export function useCanvasInteractions() {
const forwardEventToCanvas = (
event: WheelEvent | PointerEvent | MouseEvent
) => {
// Check if the wheel event is from an element that wants to capture wheel events
const target = event.target as HTMLElement
const captureElement = target?.closest('[data-capture-wheel="true"]')

if (captureElement) {
// Element wants to capture wheel events, don't forward to canvas
return
}

const canvasEl = app.canvas?.canvas
if (!canvasEl) return
event.preventDefault()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
onBlur: handleBlur
}
}"
data-capture-wheel="true"
@update:model-value="onChange"
@click.stop
@keydown.stop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:pt="{
option: 'text-xs'
}"
data-capture-wheel="true"
@update:model-value="onChange"
/>
</WidgetLayoutField>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:placeholder="placeholder || widget.name || ''"
size="small"
rows="3"
data-capture-wheel="true"
@update:model-value="onChange"
/>
<LODFallback />
Expand Down