mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Trigger Change Event before Login
Ref #4651 - Manually triggering the change event ensures compatibility with legacy password managers and browsers not properly firing events on autofill (which leads to Ember not picking up the entered values)
This commit is contained in:
parent
c030236933
commit
db1539747b
1 changed files with 4 additions and 0 deletions
|
@ -15,6 +15,10 @@ var SigninController = Ember.Controller.extend(SimpleAuth.AuthenticationControll
|
|||
validateAndAuthenticate: function () {
|
||||
var self = this;
|
||||
|
||||
// Manually trigger events for input fields, ensuring legacy compatibility with
|
||||
// browsers and password managers that don't send proper events on autofill
|
||||
$('#login').find('input').trigger('change');
|
||||
|
||||
this.validate({format: false}).then(function () {
|
||||
self.notifications.closePassive();
|
||||
self.send('authenticate');
|
||||
|
|
Loading…
Add table
Reference in a new issue