Race condition on SSL login form button
Concerned version
Version: %2.0
Platform: Nginx+Debian, tested on Firefox and Chrome
Summary
I configured SSL with the choice module, and encountered quite a confusing behaviour. (reproduced locally and at a client's site with IE, FF and Chrome)
When clicking on the login button, SSL login works... every now and then. It never works on Firefox, and on Chrome it works about one time out of 10, depending on machine load, viewport size, and probably wind direction too.
But clicking on the smartcard icon works 100% of the time!
vokoscreen-2019-06-27_16-51-20
It's not very intuitive for users that they have to click on this icon instead of the nice green button. By the way, the return key does nothing, which is bad from an accessibility standpoint.
Logs
The AJAX request completes, and the redirection to the portal is triggered by JQuery as an ajax callback
The ajax request is interrupted because clicking the button causes the page to reload
Possible fixes
Making the tryssl javascript function return false disables the click's default action, which is a form submit, and makes things works perfectly 100% of the time when clicking on the login button.
I have a MR for this, but I have only tested it on a few web browsers so far, you might want to give it more extensive testing.