summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 21:11:38 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-31 21:11:38 +0000
commite23fc37769d13a6a6913422c72220ce738fd7cc1 (patch)
tree69e690beada601edf3dc84e066706f0e62e8854f
parenteb97e043b668573067df6ceb3354ff40265854fa (diff)
downloadchromium_src-e23fc37769d13a6a6913422c72220ce738fd7cc1.zip
chromium_src-e23fc37769d13a6a6913422c72220ce738fd7cc1.tar.gz
chromium_src-e23fc37769d13a6a6913422c72220ce738fd7cc1.tar.bz2
[Mac] Fix Option-return in Omnibox.
Option-return inserted a literal newline, did not want. Also fixed Option-tab to not insert literal tab. http://crbug.com/17914 TEST=Type text, option-tab should not insert literal tab, option-return should not insert newline. Both should do nothing. Review URL: http://codereview.chromium.org/181024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24936 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_mac.mm12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
index f49963a..4ca90df 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
@@ -757,6 +757,12 @@ std::wstring AutocompleteEditViewMac::GetClipboardText(Clipboard* clipboard) {
}
}
+ // TODO(shess): Option-tab, would normally insert a literal tab
+ // character. Consider combining with -insertTab:
+ if (cmd == @selector(insertTabIgnoringFieldEditor:)) {
+ return YES;
+ }
+
// |-noop:| is sent when the user presses Cmd+Return. Override the no-op
// behavior with the proper WindowOpenDisposition.
NSEvent* event = [NSApp currentEvent];
@@ -768,6 +774,12 @@ std::wstring AutocompleteEditViewMac::GetClipboardText(Clipboard* clipboard) {
return YES;
}
+ // TODO(shess): Option-return, would normally insert a literal
+ // newline. Consider combining with -insertNewline:.
+ if (cmd == @selector(insertNewlineIgnoringFieldEditor:)) {
+ return YES;
+ }
+
// When the user does Control-Enter, the existing content has "www."
// prepended and ".com" appended. |model_| should already have
// received notification when the Control key was depressed, but it