chore: simplify focus directive

This commit is contained in:
Dominik Pschenitschni 2021-12-10 13:21:25 +01:00 committed by Gitea
parent 36fb250d1f
commit f944c35e99
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ export default {
// auto focusing elements on mobile can be annoying since in these cases the
// keyboard always pops up and takes half of the available space on the screen.
// The threshhold is the same as the breakpoints in css.
if (window.innerWidth > 769 || (typeof modifiers.always !== 'undefined' && modifiers.always)) {
if (window.innerWidth > 769 || modifiers?.always) {
el.focus()
}
},