Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: chrome/browser/resources/pdf/pdf.js

Issue 2864603006: Revert of Handle long press in PDF documents. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/pdf/gesture_detector.js ('k') | chrome/test/data/pdf/gesture_detector_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/pdf/pdf.js
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js
index 993f7b3aeaca9aa982d2baa2cdb2bfd256f0ed0a..da5793d9b0dd2e09d771c67cb3c493645f3625ad 100644
--- a/chrome/browser/resources/pdf/pdf.js
+++ b/chrome/browser/resources/pdf/pdf.js
@@ -245,8 +245,6 @@
document.addEventListener('keydown', this.handleKeyEvent_.bind(this));
document.addEventListener('mousemove', this.handleMouseEvent_.bind(this));
document.addEventListener('mouseout', this.handleMouseEvent_.bind(this));
- document.addEventListener('contextmenu',
- this.handleContextMenuEvent_.bind(this));
var tabId = this.browserApi_.getStreamInfo().tabId;
this.navigator_ = new Navigator(
@@ -412,17 +410,6 @@
this.toolbarManager_.hideToolbarsForMouseOut();
},
- handleContextMenuEvent_: function(e) {
- // Stop Chrome from popping up the context menu on long press. We need to
- // make sure the start event did not have 2 touches because we don't want
- // to block two finger tap opening the context menu. We check for
- // firesTouchEvents in order to not block the context menu on right click.
- if (e.sourceCapabilities.firesTouchEvents &&
- !this.gestureDetector_.wasTwoFingerTouch()) {
- e.preventDefault();
- }
- },
-
/**
* @private
* Rotate the plugin clockwise.
« no previous file with comments | « chrome/browser/resources/pdf/gesture_detector.js ('k') | chrome/test/data/pdf/gesture_detector_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698