Skip to content

Fix search results and keep them working in Safari #364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 1, 2017

Conversation

imaustink
Copy link
Contributor

No description provided.

@imaustink imaustink requested a review from chasenlehara June 30, 2017 22:24
We don’t really need to test whether there were more than 0 results _and_ more than 1 result.
@@ -320,6 +320,7 @@ var Search = Control.extend({
if (index && currentIndexVersion === indexVersion) {
searchEngine = lunr.Index.load(index);
}else{
var dummyContainer = document.createElement('div');
Copy link
Member

Choose a reason for hiding this comment

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

We need to not use the DOM if we’re going to move this code to a web worker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chasenlehara would it be acceptable to use striptags? I can't find a better solution without using the DOM.

Copy link
Member

Choose a reason for hiding this comment

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

I merged this as-is and worked around it by running this code before the items are sent to the web worker.

@chasenlehara chasenlehara merged commit e654e63 into master Jul 1, 2017
@chasenlehara chasenlehara deleted the fix-search-results branch July 1, 2017 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants