fix hiding of popups on escape

This commit is contained in:
Drew Weymouth
2023-03-03 20:51:04 -08:00
parent 37928881c0
commit a8ea12feaf
13 changed files with 59 additions and 55 deletions
-9
View File
@@ -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()
}
})
}