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

Unified Diff: chrome/browser/resources/file_manager/js/image_editor/gallery.js

Issue 9567003: Prevented default backspace handler in File Browser Gallery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/image_editor/gallery.js
diff --git a/chrome/browser/resources/file_manager/js/image_editor/gallery.js b/chrome/browser/resources/file_manager/js/image_editor/gallery.js
index bc59ba1f6b349a90e5e3071cde46a1cc4e6b6898..25e8a2255b903989e2679e41492b456a39e93106 100644
--- a/chrome/browser/resources/file_manager/js/image_editor/gallery.js
+++ b/chrome/browser/resources/file_manager/js/image_editor/gallery.js
@@ -572,6 +572,13 @@ Gallery.prototype.onShare_ = function(event) {
};
Gallery.prototype.onKeyDown_ = function(event) {
+ if (event.keyIdentifier == 'U+0008') { // Backspace.
SeRya 2012/03/01 11:04:08 We should be specific about modification. Otherwis
+ // The default handler would do history.back and close the Gallery.
+ // We do not want that.
+ event.preventDefault();
+ return;
+ }
+
if (this.isEditing_() && this.editor_.onKeyDown(event))
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698