Skip to content

Commit

Permalink
fix(SearchBox): Safari can only have <use> with xlinkHref (#1970)
Browse files Browse the repository at this point in the history
Since React 0.14 it's allowed to use all svg features, and thus also those that are usuallly written
with a colon.

closes #1968
  • Loading branch information
Haroenv authored and vvo committed Feb 12, 2017
1 parent dbd6cf0 commit 7ab00bd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions packages/react-instantsearch/src/components/SearchBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ class SearchBox extends Component {
/>
<button type="submit" title={translate('submitTitle')} {...cx('submit')}>
<svg role="img">
<use href="#sbx-icon-search-13"></use>
<use xlinkHref="#sbx-icon-search-13"></use>
</svg>
</button>
<button type="reset" title={translate('resetTitle')} {...cx('reset')} onClick={this.onReset}>
<svg role="img">
<use href="#sbx-icon-clear-3"></use>
<use xlinkHref="#sbx-icon-clear-3"></use>
</svg>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ exports[`Menu Menu with search inside items but no search results 1`] = `
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -62,7 +62,7 @@ exports[`Menu Menu with search inside items but no search results 1`] = `
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down Expand Up @@ -178,7 +178,7 @@ exports[`Menu Menu with search inside items with search results 1`] = `
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -189,7 +189,7 @@ exports[`Menu Menu with search inside items with search results 1`] = `
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down Expand Up @@ -269,7 +269,7 @@ exports[`Menu applies translations 1`] = `
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -280,7 +280,7 @@ exports[`Menu applies translations 1`] = `
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ exports[`RefinementList applies translations 1`] = `
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -63,7 +63,7 @@ exports[`RefinementList applies translations 1`] = `
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down Expand Up @@ -252,7 +252,7 @@ exports[`RefinementList refinement list with search inside items but no search r
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -263,7 +263,7 @@ exports[`RefinementList refinement list with search inside items but no search r
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down Expand Up @@ -393,7 +393,7 @@ exports[`RefinementList refinement list with search inside items with search res
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -404,7 +404,7 @@ exports[`RefinementList refinement list with search inside items with search res
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exports[`SearchBox applies its default props 1`] = `
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -58,7 +58,7 @@ exports[`SearchBox applies its default props 1`] = `
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down Expand Up @@ -114,7 +114,7 @@ exports[`SearchBox lets you customize its theme 1`] = `
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -125,7 +125,7 @@ exports[`SearchBox lets you customize its theme 1`] = `
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down Expand Up @@ -181,7 +181,7 @@ exports[`SearchBox lets you customize its translations 1`] = `
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -192,7 +192,7 @@ exports[`SearchBox lets you customize its translations 1`] = `
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down Expand Up @@ -248,7 +248,7 @@ exports[`SearchBox transfers the autoFocus prop to the underlying input element
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -259,7 +259,7 @@ exports[`SearchBox transfers the autoFocus prop to the underlying input element
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down Expand Up @@ -315,7 +315,7 @@ exports[`SearchBox treats its query prop as its input value 1`] = `
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -326,7 +326,7 @@ exports[`SearchBox treats its query prop as its input value 1`] = `
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down Expand Up @@ -382,7 +382,7 @@ exports[`SearchBox treats its query prop as its input value 2`] = `
<svg
role="img">
<use
href="#sbx-icon-search-13" />
xlinkHref="#sbx-icon-search-13" />
</svg>
</button>
<button
Expand All @@ -393,7 +393,7 @@ exports[`SearchBox treats its query prop as its input value 2`] = `
<svg
role="img">
<use
href="#sbx-icon-clear-3" />
xlinkHref="#sbx-icon-clear-3" />
</svg>
</button>
</div>
Expand Down

0 comments on commit 7ab00bd

Please sign in to comment.