New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure the input exists #1938
Conversation
In some case, the input doesn't exist. For example, in http://owfhx5zzh.bkt.clouddn.com/#/, after logged in, the username is gone after the routing. http://owfhx5zzh.bkt.clouddn.com/#/ username: Mario, password: password
That site doesn't load at all for me, can you reproduce it in a codepen? |
reproduction: https://codepen.io/KingMario/pen/MEorJL First, you'll be redirected to login route, hit Enter in the username field, then you'll get to the / route.
|
@@ -158,6 +158,9 @@ export default { | |||
this.$emit('blur', e) | |||
}, | |||
focus (e) { | |||
if (!this.$refs.input) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to one line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
In some case, the input doesn't exist. For example, in http://owfhx5zzh.bkt.clouddn.com/#/, after logged in, if you refresh the page, the username with autofocus prop doesn't exisit.
Login info for http://owfhx5zzh.bkt.clouddn.com/#/
username: Mario, password: password
The error message got from console if you refresh the page: