From e924b1feef22a72f6a3ce95f18bfd994e5b1f5c7 Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Mon, 29 Apr 2024 04:51:25 -0700 Subject: [PATCH] fix(notification): fix yielding focus from reply entry --- src/notification.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/notification.js b/src/notification.js index 413c173..98084db 100644 --- a/src/notification.js +++ b/src/notification.js @@ -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)); @@ -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()); } }