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

Unified Diff: chrome/browser/ui/views/extensions/extension_view.cc

Issue 7694002: Make sure Backspace in a text field in an infobar does not navigate back one page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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/ui/views/extensions/extension_view.cc
===================================================================
--- chrome/browser/ui/views/extensions/extension_view.cc (revision 97453)
+++ chrome/browser/ui/views/extensions/extension_view.cc (working copy)
@@ -172,8 +172,11 @@
bool ExtensionView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
// Let the tab key event be processed by the renderer (instead of moving the
- // focus to the next focusable view).
- return (e.key_code() == ui::VKEY_TAB);
+ // focus to the next focusable view). Also handle Backspace, since otherwise
+ // (on Windows at least), pressing Backspace, when focus is on a text field
+ // within the ExtensionView, will navigate the page back instead of erasing a
+ // character.
+ return (e.key_code() == ui::VKEY_TAB || e.key_code() == ui::VKEY_BACK);
}
void ExtensionView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
« 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