fix hiding of popups on escape
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"math"
|
||||
"strings"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
"golang.org/x/net/html"
|
||||
)
|
||||
@@ -54,11 +53,3 @@ func RichTextSegsFromHTMLString(s string) []widget.RichTextSegment {
|
||||
|
||||
return segs
|
||||
}
|
||||
|
||||
func ClosePopUpOnEscape(pop *widget.PopUp) {
|
||||
pop.Canvas.SetOnTypedKey(func(e *fyne.KeyEvent) {
|
||||
if e.Name == fyne.KeyEscape {
|
||||
pop.Hide()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user