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

Disable log in button on submit #29

Merged
merged 2 commits into from Nov 19, 2018

Conversation

DiegoCardoso
Copy link
Contributor

@DiegoCardoso DiegoCardoso commented Nov 16, 2018

Disables log in button on the submit action. User can re-enable it again by removing disabled attribute.

Fixes #9


This change is Reviewable

Disables log in button on the submit action. User can re-enable
it again by removing `disabled` attribute.

Fixes #9
@DiegoCardoso DiegoCardoso requested a review from a team November 16, 2018 15:48
@coveralls
Copy link

coveralls commented Nov 16, 2018

Pull Request Test Coverage Report for Build 73

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.2%) to 95.349%

Totals Coverage Status
Change from base Build 67: 1.2%
Covered Lines: 23
Relevant Lines: 23

💛 - Coveralls

Copy link

@alexberazouski alexberazouski left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @DiegoCardoso)


src/vaadin-login.html, line 207 at r1 (raw file):

        submit() {
          if (!this.disabled) {
            this.$.loginForm.submit();

The button becomes disabled even if the form is invalid. So actual submit didn't happen, but the button is already disabled. We could use the same logic for button click as for enter press.

Copy link
Contributor Author

@DiegoCardoso DiegoCardoso left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @alexberazouski)


src/vaadin-login.html, line 207 at r1 (raw file):

Previously, alexberazouski wrote…

The button becomes disabled even if the form is invalid. So actual submit didn't happen, but the button is already disabled. We could use the same logic for button click as for enter press.

Good catch, thanks! Done.

Copy link

@alexberazouski alexberazouski left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@DiegoCardoso DiegoCardoso merged commit ca80f68 into master Nov 19, 2018
@DiegoCardoso DiegoCardoso deleted the feature/#9-disable-login-button branch November 19, 2018 12:42
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.

None yet

3 participants