Skip to content

Commit

Permalink
fix(findbar): change focus to findButtonBar on close
Browse files Browse the repository at this point in the history
  • Loading branch information
Hormaza committed Sep 16, 2021
1 parent da78c29 commit 8bcdf1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/viewers/doc/DocBaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,9 @@ class DocBaseViewer extends BaseViewer {
}

handleFindBarClose() {
if (this.docEl) {
this.docEl.focus(); // Prevent focus from transferring to the root document element
const el = document.querySelector('.bp-FindBarToggle'); // Transferring focus to the findBarToggle Button
if (el) {
el.focus();
}
}

Expand Down

0 comments on commit 8bcdf1e

Please sign in to comment.