Skip to content

fix: clear input value on button click #116

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 1 commit into from
Nov 21, 2020
Merged

fix: clear input value on button click #116

merged 1 commit into from
Nov 21, 2020

Conversation

jordanmcdougall
Copy link

Description

When a user clicks the subscribe button, this code sets the input value to an empty string and the input placeholder value is updated to the success / fail message.

This means when the user tries to add another email, the previous address has been deleted and they can type another address without it including the previous address.

Fixes #114

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Enter valid email address, click subscribe button, click input box and previous email address value is no longer present
  • Enter invalid email address, click subscribe button, click input box and previous email address value is no longer present

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

when a user clicks the subscribe button, the input value is set to an empty string and the placeholder value is updates
@akanksha-raghav akanksha-raghav merged commit 287adab into StudentCode-in:master Nov 21, 2020
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.

Newsletter input box text needs to be selected on click
3 participants