Skip to content

Commit

Permalink
Added type button, avoid submit on password toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
slackero committed Nov 6, 2021
1 parent dc67ccb commit af18924
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/show-password-toggle-jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $(function () {
show: $this.data('show') || 'Show password as plain text. Warning: this will display your password on the screen.',
hide: $this.data('hide') || 'Hide password.'
};
let $toggleButton = $('<button class="toggle-password" aria-label="" aria-pressed="false"></button>');
let $toggleButton = $('<button type="button" class="toggle-password" aria-label="" aria-pressed="false"></button>');
$toggleButton.on('click', function () {
if ($this.attr('type') === 'password') {
$this.attr('type', 'text');
Expand Down
2 changes: 1 addition & 1 deletion js/show-password-toggle-jquery.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@slackero/bootstrap-show-password-toggle",
"version": "1.3.2",
"version": "1.3.3",
"description": "A show password as text toggle for Bootstrap",
"keywords": [
"bootstrap",
Expand Down

0 comments on commit af18924

Please sign in to comment.