Android: back button will close the keyboard
This commit is contained in:
parent
714bed7c51
commit
e9c828a2c5
2 changed files with 11 additions and 1 deletions
|
@ -10,7 +10,7 @@
|
|||
import LoginToggle from "./Base/LoginToggle.svelte"
|
||||
import Pencil from "../assets/svg/Pencil.svelte"
|
||||
import Constants from "../Models/Constants"
|
||||
import { Store, Stores, UIEventSource } from "../Logic/UIEventSource"
|
||||
import { ImmutableStore, Store, Stores, UIEventSource } from "../Logic/UIEventSource"
|
||||
import ThemesList from "./BigComponents/ThemesList.svelte"
|
||||
import { MinimalThemeInformation } from "../Models/ThemeConfig/ThemeConfig"
|
||||
import Eye from "../assets/svg/Eye.svelte"
|
||||
|
@ -105,6 +105,14 @@
|
|||
}
|
||||
})
|
||||
|
||||
AndroidPolyfill.onBackButton((() => {
|
||||
if(searchIsFocussed.data){
|
||||
searchIsFocussed.set(false)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}), {returnToIndex: new ImmutableStore(false)})
|
||||
|
||||
/**
|
||||
* Opens the first search candidate
|
||||
*/
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
inputElement?.select()
|
||||
}
|
||||
})
|
||||
}else if(document.activeElement === inputElement){
|
||||
inputElement?.blur()
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue