Skip to content

Commit

Permalink
Bug 1915992 - wait for job to be pinned (and therefore pinboard to be…
Browse files Browse the repository at this point in the history
… shown) before setting focus to bug number input

Fixes a regression from the upgrade to React 18 (bug 1901015).
  • Loading branch information
Archaeopteryx committed Aug 30, 2024
1 parent 88023a1 commit 7101d64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/job-view/KeyboardShortcuts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
};
Expand Down

0 comments on commit 7101d64

Please sign in to comment.