mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
Fix #249 - Focus user field after opening login modal
Signed-off-by: Erik Michelson <erik@liltv.de>
This commit is contained in:
parent
472ae01546
commit
c9abe4276f
1 changed files with 14 additions and 0 deletions
|
@ -428,3 +428,17 @@ $('.ui-use-tags').on('change', function () {
|
||||||
$('.search').keyup(() => {
|
$('.search').keyup(() => {
|
||||||
checkHistoryList()
|
checkHistoryList()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// focus user field after opening login modal
|
||||||
|
$('.signin-modal').on('shown.bs.modal', function () {
|
||||||
|
let fieldLDAP = $('input[name=username]')
|
||||||
|
let fieldEmail = $('input[name=email]')
|
||||||
|
let fieldOpenID = $('input[name=openid_identifier]')
|
||||||
|
if (fieldLDAP.length === 1) {
|
||||||
|
fieldLDAP.focus()
|
||||||
|
} else if (fieldEmail.length === 1) {
|
||||||
|
fieldEmail.focus()
|
||||||
|
} else if (fieldOpenID.length === 1) {
|
||||||
|
fieldOpenID.focus()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue