Browse Source

Fix dropdown focus

merge-requests/1/merge
Chris Miller 3 years ago committed by Trevor Slocum
parent
commit
806d63d900
  1. 4
      dropdown.go

4
dropdown.go

@ -484,7 +484,7 @@ func (d *DropDown) openList(setFocus func(Primitive), app *Application) {
if event.Buttons() != 0 {
// If a mouse button was pressed, cancel this capture.
app.SetMouseCapture(nil)
d.closeList(nil) // Close but don't focus.
d.closeList(event.SetFocus)
}
}
}
@ -496,7 +496,7 @@ func (d *DropDown) openList(setFocus func(Primitive), app *Application) {
func (d *DropDown) closeList(setFocus func(Primitive)) {
d.open = false
if setFocus != nil {
if d.list.HasFocus() {
setFocus(d)
}
}

Loading…
Cancel
Save