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

Initialize loginUser and loginPass with an empty string #1175

Merged

Conversation

Projects
None yet
2 participants
@BillyBlaze
Copy link
Collaborator

commented Jan 3, 2016

In this PR:

  1. Initialize loginUser and loginPass with an empty string
    If you login without entering any information then jQuery would succeed the failed AJAX request and tries to add the notification with "Login succes" but generates the following javascript error:

    Uncaught TypeError: Cannot read property 'name' of undefined
     $.ajax.success @ packed_app.js?35ab948d:1599
     l @ packed_libs.js?1bb5f6cd:3
     c.fireWith @ packed_libs.js?1bb5f6cd:3
     k @ packed_libs.js?1bb5f6cd:5
     (anonymous function) @ packed_libs.js?1bb5f6cd:5
    

    Strangely I noticed that the second post without entering information wouldn't trigger an error, I found out that was because during the post the observable where reset to an empty string. (so if we initialize with an empty string it wouldn't trigger the success function the first too)

  2. Clear loginUser and loginPass after a successful login
    A small usability thing, but very useful, I find it very annoying if I mistyped something to redo all the inputs, let the user control this. If this is to much for the maintenance branch then I can cherry pick this out ofcourse.

Paul de Vries
Initialize loginUser and loginPass with an empty string
Clear loginUser and loginPass after a successful login (e.g. the user made a typo)

@foosel foosel merged commit 34ceb93 into foosel:maintenance Jan 5, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@BillyBlaze BillyBlaze deleted the BillyBlaze:maintenance_pnotify_undefined branch Jan 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.