authPrompt: Do not allow bypassing disabled Sign In button

The Next and Sign In buttons are disabled when the username/password
field is empty. However, the user can still bypass this button by
pressing the enter key, leading to some odd glitches with the log in
for 'Not Listed?' users.

This is easy to fix by simply not progressing to the next screen when
the button is disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=746180
This commit is contained in:
Michael Catanzaro 2016-01-07 16:03:41 -06:00
parent cca01e3f02
commit f5d9d188a7

View File

@ -189,6 +189,7 @@ const AuthPrompt = new Lang.Class({
this._updateNextButtonSensitivity(this._entry.text.length > 0); this._updateNextButtonSensitivity(this._entry.text.length > 0);
})); }));
this._entry.clutter_text.connect('activate', Lang.bind(this, function() { this._entry.clutter_text.connect('activate', Lang.bind(this, function() {
if (this.nextButton.reactive)
this.emit('next'); this.emit('next');
})); }));
}, },