Skip to content

Commit 11e3c10

Browse files
authored
Merge pull request #5 from GWuk/v1.1
fixes #4 - enter added character
2 parents 8364a4c + 658b6e6 commit 11e3c10

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

js/stanford-pwdhash.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ SPH_PasswordProtector.prototype = {
278278
}
279279

280280
// Printable keystrokes should be masked
281-
if(evt.type == "keypress") {
281+
if(evt.type == "keypress" && evt.charCode!=13) {
282282
evt.stopPropagation(); // Don't let user JavaScript see this event
283283
evt.preventDefault(); // Do not let the character hit the page
284284
evt.originalTarget.value = evt.originalTarget.value + String.fromCharCode(this.mask(evt.charCode));

0 commit comments

Comments
 (0)