Merge pull request #17074 from calixteman/issue17071

Make the toolbar buttons usable with keyboard when Page Fit is used
This commit is contained in:
calixteman 2023-10-05 20:28:56 +02:00 committed by GitHub
commit 2453b79fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3100,6 +3100,8 @@ function webViewerKeyDown(evt) {
curElementTagName === "INPUT" ||
curElementTagName === "TEXTAREA" ||
curElementTagName === "SELECT" ||
(curElementTagName === "BUTTON" &&
(evt.keyCode === /* Enter = */ 13 || evt.keyCode === /* Space = */ 32)) ||
curElement?.isContentEditable
) {
// Make sure that the secondary toolbar is closed when Escape is pressed.