Skip to content

Commit 5fa45f3

Browse files
committed
Fix #4091
1 parent 1eb8ea4 commit 5fa45f3

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

src/shared/components/Contentful/SearchBar/SearchBar.jsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,24 @@ export class SearchBarInner extends Component {
158158
{
159159
_.map(suggestionList.Article, item => (
160160
<div
161+
role="button"
162+
tabIndex="0"
161163
key={`${item.title}-${item.content}-${item.featuredImage}`}
162164
className={theme['group-cell']}
165+
onClick={() => {
166+
window.location.href = (item.externalArticle && item.contentUrl)
167+
? item.contentUrl : `${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/${item.title}`;
168+
}}
169+
onKeyPress={_.noop}
163170
>
164171
<a
165172
className={theme.articleLink}
166173
href={(item.externalArticle && item.contentUrl) ? item.contentUrl : `${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/${item.title}`}
167174
target={(item.externalArticle && item.contentUrl) ? '_blank' : '_self'}
175+
onClick={(e) => {
176+
e.nativeEvent.stopImmediatePropagation();
177+
e.stopPropagation();
178+
}}
168179
>
169180
{
170181
item.featuredImage ? (
@@ -199,12 +210,23 @@ export class SearchBarInner extends Component {
199210
_.map(suggestionList.Video, item => (
200211
<div
201212
key={`${item.title}-${item.content}-${item.featuredImage}`}
213+
role="button"
214+
tabIndex="-11"
202215
className={theme['group-cell']}
216+
onClick={() => {
217+
window.location.href = (item.externalArticle && item.contentUrl)
218+
? item.contentUrl : `${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/${item.title}`;
219+
}}
220+
onKeyPress={_.noop}
203221
>
204222
<a
205223
className={theme.articleLink}
206224
href={(item.externalArticle && item.contentUrl) ? item.contentUrl : `${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/${item.title}`}
207225
target={(item.externalArticle && item.contentUrl) ? '_blank' : '_self'}
226+
onClick={(e) => {
227+
e.nativeEvent.stopImmediatePropagation();
228+
e.stopPropagation();
229+
}}
208230
>
209231
{
210232
item.featuredImage ? (

src/shared/components/Contentful/SearchPageFilter/SearchPageFilter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ SearchPageFilterInner.defaultProps = {
201201
onApply: () => { },
202202
selectedAuthor: DEF_SELECTED_AUTHOR,
203203
authorList: [DEF_SELECTED_AUTHOR],
204-
startDate: moment().subtract(1, 'months'),
204+
startDate: moment('2001-01-02'),
205205
endDate: moment(),
206206
tags: [],
207207
selectedCategory: '',

src/shared/components/Contentful/TracksFilter/TracksFilter.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ TracksFilterInner.defaultProps = {
153153
onApply: () => {},
154154
selectedAuthor: DEF_SELECTED_AUTHOR,
155155
authorList: [DEF_SELECTED_AUTHOR],
156-
startDate: moment().subtract(1, 'months'),
156+
startDate: moment('2001-01-02'),
157157
endDate: moment(),
158158
tags: [],
159159
};

0 commit comments

Comments
 (0)