Skip to content

Fix: cursor on Login button becomes cursor: not-allowed in pristine state #2452

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

Merged
merged 9 commits into from
Sep 21, 2023

Conversation

rajatmohan22
Copy link
Contributor

@rajatmohan22 rajatmohan22 commented Sep 18, 2023

Fixes #2228

Upon some investigation, I found that the value prop of the input field in a web form is not able to recognize Google Autocomplete with a password manager. Seems like it is bypassing Reacts state management.

screen-capture.webm

Changes:

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@welcome
Copy link

welcome bot commented Sep 18, 2023

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

@rajatmohan22 rajatmohan22 changed the title Fixing the Login Page Fix: cursor on Login button becomes cursor: not allowed Sep 18, 2023
@rajatmohan22 rajatmohan22 changed the title Fix: cursor on Login button becomes cursor: not allowed Fix: cursor on Login button becomes cursor: not-allowed in pristine state Sep 18, 2023
Copy link
Collaborator

@lindapaiste lindapaiste left a comment

Choose a reason for hiding this comment

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

Looks good but let's clean up the import line before merging.

@@ -1,4 +1,4 @@
import React from 'react';
import React, { useEffect, useState } from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import React, { useEffect, useState } from 'react';
import React from 'react';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done !

Remove `pristine` import
@rajatmohan22
Copy link
Contributor Author

@lindapaiste, could you please take a look? I've removed unnecessary imports. The only thing I believe needs attention is the 'value' prop storing the user's input. Do you think it's safe to leave it this way, or should I make changes here if necessary?

@lindapaiste
Copy link
Collaborator

I don’t think that the value prop is a problem? You can definitely research what the best practices are for dealing with an input type=“password”, but let’s tackle that in a separate PR.

If it’s easy, can you roll back the changes in the package-lock.json file and in the Button file? It’s it’s a pain then no worries.

@rajatmohan22
Copy link
Contributor Author

@lindapaiste, not a problem at all. I've rolled them back. My apologies for missing that.

lindapaiste
lindapaiste previously approved these changes Sep 21, 2023
@lindapaiste
Copy link
Collaborator

We’re just about ready to merge but it’s failing lint checks due to a formatting issue. We use a package called Prettier so that all code is formatted nicely and consistently. Now that you removed one of the destructured properties, Prettier thinks that it should all be on one line instead of on separate lines. If you run the lint-fix command that should take care of it.

@rajatmohan22
Copy link
Contributor Author

rajatmohan22 commented Sep 21, 2023

We’re just about ready to merge but it’s failing lint checks due to a formatting issue. We use a package called Prettier so that all code is formatted nicely and consistently. Now that you removed one of the destructured properties, Prettier thinks that it should all be on one line instead of on separate lines. If you run the lint-fix command that should take care of it.

@lindapaiste The test passed! Thanks for the suggestion

@lindapaiste lindapaiste merged commit ca74574 into processing:develop Sep 21, 2023
@rajatmohan22 rajatmohan22 deleted the loginPage branch September 22, 2023 02:22
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.

Log In button sometimes shows cursor: not-allowed when autofilled with a saved password
2 participants