Merge pull request #20003 from calixteman/bug1971299

Remove the possibility to go to the next page in using the ENTER key (bug 1971299)
This commit is contained in:
calixteman 2025-06-17 22:43:18 +02:00 committed by GitHub
commit 3baea2feff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2897,8 +2897,7 @@ function onKeyDown(evt) {
curElementTagName === "INPUT" || curElementTagName === "INPUT" ||
curElementTagName === "TEXTAREA" || curElementTagName === "TEXTAREA" ||
curElementTagName === "SELECT" || curElementTagName === "SELECT" ||
(curElementTagName === "BUTTON" && (curElementTagName === "BUTTON" && evt.keyCode === /* Space = */ 32) ||
(evt.keyCode === /* Enter = */ 13 || evt.keyCode === /* Space = */ 32)) ||
curElement?.isContentEditable curElement?.isContentEditable
) { ) {
// Make sure that the secondary toolbar is closed when Escape is pressed. // Make sure that the secondary toolbar is closed when Escape is pressed.
@ -2969,7 +2968,6 @@ function onKeyDown(evt) {
} }
turnPage = 1; turnPage = 1;
break; break;
case 13: // enter key
case 32: // spacebar case 32: // spacebar
if (!isViewerInPresentationMode) { if (!isViewerInPresentationMode) {
turnOnlyIfPageFit = true; turnOnlyIfPageFit = true;
@ -3037,7 +3035,6 @@ function onKeyDown(evt) {
// shift-key // shift-key
if (cmd === 4) { if (cmd === 4) {
switch (evt.keyCode) { switch (evt.keyCode) {
case 13: // enter key
case 32: // spacebar case 32: // spacebar
if ( if (
!isViewerInPresentationMode && !isViewerInPresentationMode &&