diff --git a/vxfw/vxfw.go b/vxfw/vxfw.go index c7a74ef..75788d9 100644 --- a/vxfw/vxfw.go +++ b/vxfw/vxfw.go @@ -276,7 +276,8 @@ func (f *focusHandler) updatePath(root Surface) { ok := f.childHasFocus(root) if !ok { - panic("focused widget not found in Surface tree") + // reset focus to root widget + f.focused = root.Widget } if f.root != root.Widget {