authPrompt: Don't focus hidden cancelButton
The button is hidden on the lock screen, so it shouldn't be allowed to activate it, be it via click or keyboard. The latter is still possible by keynaving to the button and hitting space/enter. Fix that by making the button unfocusable when we make it unreactive. https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210
This commit is contained in:
parent
c52fd9373c
commit
ab24ee7a7e
@ -134,7 +134,7 @@ var AuthPrompt = GObject.registerClass({
|
||||
style_class: 'modal-dialog-button button cancel-button',
|
||||
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
||||
reactive: this._hasCancelButton,
|
||||
can_focus: true,
|
||||
can_focus: this._hasCancelButton,
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
child: new St.Icon({ icon_name: 'go-previous-symbolic' }),
|
||||
@ -285,6 +285,7 @@ var AuthPrompt = GObject.registerClass({
|
||||
this.setActorInDefaultButtonWell(null);
|
||||
this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED;
|
||||
this.cancelButton.reactive = false;
|
||||
this.cancelButton.can_focus = false;
|
||||
}
|
||||
|
||||
_onReset() {
|
||||
@ -453,6 +454,7 @@ var AuthPrompt = GObject.registerClass({
|
||||
let oldStatus = this.verificationStatus;
|
||||
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
|
||||
this.cancelButton.reactive = this._hasCancelButton;
|
||||
this.cancelButton.can_focus = this._hasCancelButton;
|
||||
this._preemptiveAnswer = null;
|
||||
|
||||
if (this._userVerifier)
|
||||
|
Loading…
Reference in New Issue
Block a user