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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm

Issue 2904243002: Don't reset the omnibox state on command-return. (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 | « 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/cocoa/omnibox/omnibox_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
index d692fc07277bf42f6d1d2a65aefd257f615de183..b7f5240ffbdfe6d928203b67769e3e88ce845c5a 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm
@@ -824,19 +824,9 @@ bool OmniboxViewMac::OnDoCommandBySelector(SEL cmd) {
(cmd == @selector(noop:) &&
([event type] == NSKeyDown || [event type] == NSKeyUp) &&
[event keyCode] == kVK_Return)) {
- // If the user hasn't entered any text in keyword search mode, we need to
- // return early in order to avoid cancelling the search.
- if (GetTextLength() == 0)
rohitrao (ping after 24h) 2017/05/30 14:41:14 This was a fix you added earlier this month? Now
Justin Donnelly 2017/05/30 15:32:48 Yes, that's correct. This was just to avoid callin
- return true;
-
WindowOpenDisposition disposition =
ui::WindowOpenDispositionFromNSEvent(event);
model()->AcceptInput(disposition, false);
- // Opening a URL in a background tab should also revert the omnibox contents
- // to their original state. We cannot do a blanket revert in OpenURL()
- // because middle-clicks also open in a new background tab, but those should
- // not revert the omnibox text.
- RevertAll();
return true;
}
« 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