Index: chrome/browser/resources/pdf/pdf.js |
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js |
index 88e3d26bc5ee57ec2f9146b5605513fb2deda1ae..dea9e727c3193fe22b91cd99a71e245fcba2bd47 100644 |
--- a/chrome/browser/resources/pdf/pdf.js |
+++ b/chrome/browser/resources/pdf/pdf.js |
@@ -205,14 +205,16 @@ PDFViewer.prototype = { |
pageDownHandler(); |
return; |
case 37: // Left arrow key. |
- // Go to the previous page if there are no horizontal scrollbars. |
- if (!this.viewport_.documentHasScrollbars().x) { |
- this.viewport_.goToPage(this.viewport_.getMostVisiblePage() - 1); |
- // Since we do the movement of the page. |
- e.preventDefault(); |
- } else if (fromScriptingAPI) { |
- position.x -= Viewport.SCROLL_INCREMENT; |
- this.viewport.position = position; |
+ if (!(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) { |
+ // Go to the previous page if there are no horizontal scrollbars. |
+ if (!this.viewport_.documentHasScrollbars().x) { |
+ this.viewport_.goToPage(this.viewport_.getMostVisiblePage() - 1); |
+ // Since we do the movement of the page. |
+ e.preventDefault(); |
+ } else if (fromScriptingAPI) { |
+ position.x -= Viewport.SCROLL_INCREMENT; |
+ this.viewport.position = position; |
+ } |
} |
return; |
case 38: // Up arrow key. |
@@ -222,14 +224,16 @@ PDFViewer.prototype = { |
} |
return; |
case 39: // Right arrow key. |
- // Go to the next page if there are no horizontal scrollbars. |
- if (!this.viewport_.documentHasScrollbars().x) { |
- this.viewport_.goToPage(this.viewport_.getMostVisiblePage() + 1); |
- // Since we do the movement of the page. |
- e.preventDefault(); |
- } else if (fromScriptingAPI) { |
- position.x += Viewport.SCROLL_INCREMENT; |
- this.viewport.position = position; |
+ if (!(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey)) { |
+ // Go to the next page if there are no horizontal scrollbars. |
+ if (!this.viewport_.documentHasScrollbars().x) { |
+ this.viewport_.goToPage(this.viewport_.getMostVisiblePage() + 1); |
+ // Since we do the movement of the page. |
+ e.preventDefault(); |
+ } else if (fromScriptingAPI) { |
+ position.x += Viewport.SCROLL_INCREMENT; |
+ this.viewport.position = position; |
+ } |
} |
return; |
case 40: // Down arrow key. |