reset focus whenever navigating between pages, not just back/forward

This commit is contained in:
Drew Weymouth
2024-04-27 09:53:22 -07:00
parent 93cd796f1b
commit a00b395692
2 changed files with 4 additions and 3 deletions
-3
View File
@@ -268,14 +268,11 @@ func (m *MainWindow) addShortcuts() {
for _, sh := range os.BackShortcuts {
m.Canvas().AddShortcut(&sh, func(_ fyne.Shortcut) {
m.BrowsingPane.GoBack()
// TODO: reset focus only if something inside the page had focus
m.Canvas().Focus(nil)
})
}
for _, sh := range os.ForwardShortcuts {
m.Canvas().AddShortcut(&sh, func(_ fyne.Shortcut) {
m.BrowsingPane.GoForward()
m.Canvas().Focus(nil)
})
}
if os.SettingsShortcut != nil {