From 7101d64872e8d51ac08574c69dae4bb2fe764f71 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Thu, 29 Aug 2024 13:23:36 +0200 Subject: [PATCH] Bug 1915992 - wait for job to be pinned (and therefore pinboard to be shown) before setting focus to bug number input Fixes a regression from the upgrade to React 18 (bug 1901015). --- ui/job-view/KeyboardShortcuts.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/job-view/KeyboardShortcuts.jsx b/ui/job-view/KeyboardShortcuts.jsx index 80a1cf24c7f..89dfb18075f 100644 --- a/ui/job-view/KeyboardShortcuts.jsx +++ b/ui/job-view/KeyboardShortcuts.jsx @@ -113,11 +113,11 @@ class KeyboardShortcuts extends React.Component { }; // pin selected job to pinboard and add a related bug - addRelatedBug = () => { + addRelatedBug = async () => { const { selectedJob, pinJob } = this.props; if (selectedJob) { - pinJob(selectedJob); + await pinJob(selectedJob); document.getElementById('add-related-bug-button').click(); } };