Skip to content

Commit 2b3fa53

Browse files
committed
Avoid putting interactive elements inside PowerSelect
This pattern started breaking on Ember 3.28, causing a hard redirect out of QUnit and making a test time out.
1 parent fe93dc6 commit 2b3fa53

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

app/components/page-layout.hbs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,25 @@
77
</LinkTo>
88
{{#if this.showHeaderSearch}}
99
<div class="search with-default-styling test-header-search">
10-
<PowerSelectTypeahead @search={{perform this.searchForAddons}} @selected={{this.selectedAddon}} @placeholder="Search" @dropdownClass="test-header-search-dropdown" @noMatchesMessage="No matching addon names, try another search!" @onChange={{perform this.goToAddon}} as |addonName options|>
10+
<PowerSelectTypeahead
11+
@search={{perform this.searchForAddons}}
12+
@selected={{this.selectedAddon}}
13+
@placeholder="Search"
14+
@dropdownClass="test-header-search-dropdown"
15+
@noMatchesMessage="No matching addon names, try another search!"
16+
@onChange={{perform this.goToAddon}}
17+
as |addonName options|
18+
>
1119
{{#if addonName.isFullSearchLink}}
12-
<LinkTo @route="index" @query={{hash query=options.searchText}} class="jump-to-full-search test-search-result-jump-to-full-search-link">
20+
<span class="jump-to-full-search test-search-result test-search-result-jump-to-full-search-link">
1321
{{#if addonName.noResults}}
1422
No matching addons (by name). Try a full search &raquo;
1523
{{else}}
1624
Perform full search &raquo;
1725
{{/if}}
18-
</LinkTo>
26+
</span>
1927
{{else}}
20-
<LinkTo @route="addons.show" @model={{addonName}} class="test-search-result-addon-link">{{addonName}}</LinkTo>
28+
<span class="test-search-result test-search-result-addon-link">{{addonName}}</span>
2129
{{/if}}
2230
</PowerSelectTypeahead>
2331
{{#if this.searchForAddons.isRunning}}

app/styles/components/_page-layout.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,8 @@
240240
}
241241
}
242242
}
243+
244+
// This must be at root level because power-select wormholes the element out of its template context
245+
.test-search-result {
246+
@extend a;
247+
}

0 commit comments

Comments
 (0)