File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
src/BootstrapBlazor.Server/Components/Samples/Tutorials/LoginAndRegister Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 55 if ( email ) {
66 email . classList . add ( 'show' ) ;
77 const input = email . querySelector ( '.input' ) ;
8- input . focus ( ) ;
9- input . select ( ) ;
8+ if ( input ) {
9+ input . focus ( ) ;
10+ input . select ( ) ;
11+ }
1012 }
1113 }
1214}
@@ -27,8 +29,10 @@ export function go(id) {
2729 password . classList . add ( 'animate-fade-in' )
2830 password . classList . remove ( 'animate-fade-out' )
2931 const input = password . querySelector ( '.input' ) ;
30- input . focus ( ) ;
31- input . select ( ) ;
32+ if ( input ) {
33+ input . focus ( ) ;
34+ input . select ( ) ;
35+ }
3236 }
3337 }
3438}
@@ -42,8 +46,10 @@ export function back(id) {
4246 email . classList . remove ( 'animate-fade-out' ) ;
4347 email . classList . add ( 'animate-fade-in' ) ;
4448 const input = email . querySelector ( '.input' ) ;
45- input . focus ( ) ;
46- input . select ( ) ;
49+ if ( input ) {
50+ input . focus ( ) ;
51+ input . select ( ) ;
52+ }
4753 }
4854
4955 const password = el . querySelector ( '.login-item-password' ) ;
You can’t perform that action at this time.
0 commit comments