Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

hook up search in urlbar #56

Merged
merged 3 commits into from
Dec 16, 2015
Merged

hook up search in urlbar #56

merged 3 commits into from
Dec 16, 2015

Conversation

diracdeltas
Copy link
Member

Known bug: search autocomplete doesn't work for multi-word searches

Auditors: @bbondy

@@ -88,6 +89,10 @@ class UrlBar extends ImmutableComponent {
if (this.suggestionsShown && selectedIndex > 0) {
// load the selected suggestion
this.refs.urlBarSuggestions.clickSelected()
} else if (this.props.searchSuggestions &&
(!UrlUtil.isURL(location) || location.includes(' '))) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprisingly, UrlUtil.isURL(location) returns true if location contains whitespace.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noted, we might want to bring in UrlUtil into our own repo in the future.

@bbondy
Copy link
Member

bbondy commented Dec 16, 2015

Great work, thanks.

In the old browser, we had a differentiator for Command+L vs Command+K for privacy reasons.
They were exactly the same but Command+L would not do search suggestions for privacy reasons.
Something for a follow up.

Please merge at will.

@bbondy
Copy link
Member

bbondy commented Dec 16, 2015

Sorry accidentally committed that last one into your branch. I'll just merge it all in.

bbondy added a commit that referenced this pull request Dec 16, 2015
@bbondy bbondy merged commit 0b4441b into master Dec 16, 2015
@bbondy bbondy deleted the feature/opensearch branch December 19, 2015 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants