0
Fork 0
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:
Felix Rieseberg 2014-12-16 12:27:08 -08:00
parent c030236933
commit db1539747b

View file

@ -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');