Skip to content

Commit

Permalink
fix(notification): fix yielding focus from reply entry
Browse files Browse the repository at this point in the history
  • Loading branch information
andyholmes committed Apr 29, 2024
1 parent 9a7fa27 commit e924b1f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class NotificationMessage extends Calendar.NotificationMessage {

this._replyEntry.clutter_text.text = '';

if (this._replyEntry?.visible) {
if (showEntry) {
this._replyEntry.grab_key_focus();
this._replyFocusOutId = this._replyEntry.clutter_text.connect(
'key-focus-out', () => this._toggleReplyEntry(false));
Expand Down Expand Up @@ -129,10 +129,7 @@ class NotificationMessage extends Calendar.NotificationMessage {
this._replyPressEventId = null;
}

// FIXME: the keyboard focus is yielded to the notification banner,
// but it still gets lost in `Calendar.NotificationSection`
global.stage.set_focus(null);
this.grab_key_focus();
global.stage.set_key_focus(this.get_parent());
}
}

Expand Down

0 comments on commit e924b1f

Please sign in to comment.