fix(tui): keep runtime controls interactive

This commit is contained in:
Xubin Ren
2026-08-17 20:56:10 +08:00
parent 03d982023a
commit a632017194
4 changed files with 20 additions and 10 deletions
+7
View File
@@ -49,6 +49,12 @@ export class PickerMenu<T> {
paddingRight: 1,
backgroundColor: RGBA.defaultBackground(),
visible: false,
onMouseDown: (event) => {
if (event.button !== 0) return
event.preventDefault()
event.stopPropagation()
this.renderer.clearSelection()
},
})
}
@@ -138,6 +144,7 @@ export class PickerMenu<T> {
if (event.button !== 0) return
event.preventDefault()
event.stopPropagation()
this.renderer.clearSelection()
this.selected = index
this.options.onSelect?.(item)
},