Skip to content
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

Introduces autofocus of password when remember user is checked #3068

Merged
merged 3 commits into from
Jun 9, 2021

Conversation

kelsos
Copy link
Member

@kelsos kelsos commented Jun 9, 2021

Closes #2954

Comment on lines 325 to 331
private focusPassword() {
this.$nextTick(() =>
setTimeout(() => {
(this.$refs.password as any).$el
.querySelector('input:not([type=hidden])')
.focus();
}, 100)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a bit more complicated than I expected. I had to go through a couple of so threads.

@codecov
Copy link

codecov bot commented Jun 9, 2021

Codecov Report

Merging #3068 (1cafc69) into develop (1ae66b5) will increase coverage by 0.06%.
The diff coverage is 72.82%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3068      +/-   ##
===========================================
+ Coverage    66.35%   66.42%   +0.06%     
===========================================
  Files          562      563       +1     
  Lines        36412    36447      +35     
  Branches      5348     5372      +24     
===========================================
+ Hits         24161    24209      +48     
+ Misses       10932    10920      -12     
+ Partials      1319     1318       -1     
Flag Coverage Δ
frontend_integration 45.43% <85.71%> (+0.13%) ⬆️
frontend_unit 19.87% <6.66%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...app/src/components/accounts/ManualBalancesForm.vue 77.04% <ø> (ø)
...nd/app/src/components/asset-manager/AssetTable.vue 0.00% <0.00%> (ø)
...end/app/src/components/helper/LocationSelector.vue 62.50% <ø> (ø)
frontend/app/src/utils/assets.ts 72.97% <72.97%> (ø)
frontend/app/src/components/inputs/AssetSelect.vue 87.50% <84.21%> (+4.16%) ⬆️
...nd/app/src/components/account-management/Login.vue 78.78% <100.00%> (+5.37%) ⬆️
.../src/components/helper/display/icons/AssetIcon.vue 90.90% <100.00%> (+3.81%) ⬆️
...ontend/app/src/components/history/LocationIcon.vue 85.71% <100.00%> (+2.38%) ⬆️
frontend/app/src/components/inputs/TagInput.vue 42.10% <100.00%> (+3.21%) ⬆️
frontend/app/src/store/statistics/getters.ts 50.00% <0.00%> (-27.78%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1979b1...1cafc69. Read the comment docs.

@yabirgb
Copy link
Member

yabirgb commented Jun 9, 2021

I get this error and the password field wasn't autofocused

image

@kelsos
Copy link
Member Author

kelsos commented Jun 9, 2021

interesting.

@kelsos
Copy link
Member Author

kelsos commented Jun 9, 2021

Ok, it seems that this happens on a fresh start but not when refreshing.

@kelsos
Copy link
Member Author

kelsos commented Jun 9, 2021

To test the focus working properly in dev mode you have to comment the dev tools opening. Otherwise it will mess with the focus

if (!process.env.IS_TEST) win.webContents.openDevTools();

@yabirgb
Copy link
Member

yabirgb commented Jun 9, 2021

Okey for me it's fine. As I understand this will work correctly on the final release so we can merge it :)

@LefterisJP LefterisJP merged commit e451648 into rotki:develop Jun 9, 2021
@kelsos kelsos deleted the rotki-2954 branch June 25, 2021 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move cursor to Password field when Remember User was selected
3 participants