Skip to content

Commit c71f531

Browse files
committed
debugui: bug fix: Focus didn't work
1 parent 0966374 commit c71f531

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

context.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ type Context struct {
1919
hover WidgetID
2020
focus WidgetID
2121
currentID WidgetID
22-
lastID WidgetID
2322
lastZIndex int
2423
keepFocus bool
2524
hoverRoot *container
@@ -76,7 +75,6 @@ func (c *Context) begin() {
7675
c.hoverRoot = c.nextHoverRoot
7776
c.nextHoverRoot = nil
7877
c.currentID = emptyWidgetID
79-
c.lastID = emptyWidgetID
8078
}
8179

8280
func (c *Context) end() error {

helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func (c *Context) bringToFront(cnt *container) {
1313
}
1414

1515
func (c *Context) Focus() {
16-
c.setFocus(c.lastID)
16+
c.setFocus(c.currentID)
1717
}
1818

1919
func (c *Context) setFocus(id WidgetID) {

0 commit comments

Comments
 (0)