1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Make the secondary menu button usable with the keyboard when NVDA is enabled

It's a temporary workaround until bug 1921984 is fixed.
This commit is contained in:
Calixte Denizet 2024-10-01 16:57:34 +02:00
parent 783facb312
commit 392c17efa0

View file

@ -2750,7 +2750,10 @@ function onClick(evt) {
if (
this.pdfViewer.containsElement(evt.target) ||
(appConfig.toolbar?.container.contains(evt.target) &&
evt.target !== appConfig.secondaryToolbar?.toggleButton)
// TODO: change the `contains` for an equality check when the bug:
// https://bugzilla.mozilla.org/show_bug.cgi?id=1921984
// is fixed.
!appConfig.secondaryToolbar?.toggleButton.contains(evt.target))
) {
this.secondaryToolbar.close();
}