File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ define([
30
30
31
31
dynamicWidgets : [ ] ,
32
32
33
+ hasInteracted : false ,
34
+
33
35
///////////////////////////
34
36
// Main build functions //
35
37
///////////////////////////
@@ -425,6 +427,7 @@ define([
425
427
placeholder : algoliaConfig . translations . searchFor ,
426
428
showSubmit : false ,
427
429
queryHook : ( inputValue , search ) => {
430
+ this . hasInteracted = true ;
428
431
if (
429
432
algoliaConfig . isSearchPage &&
430
433
! algoliaConfig . request . categoryId &&
@@ -1064,12 +1067,14 @@ define([
1064
1067
} ,
1065
1068
1066
1069
getRedirectWidget ( ) {
1070
+ const uiComponnent = this ;
1067
1071
return {
1068
1072
render ( { results } ) {
1069
1073
if (
1070
1074
results &&
1071
1075
results . renderingContent &&
1072
- results . renderingContent . redirect
1076
+ results . renderingContent . redirect &&
1077
+ ! uiComponnent . hasInteracted
1073
1078
) {
1074
1079
window . location . href = results . renderingContent . redirect . url ;
1075
1080
}
You can’t perform that action at this time.
0 commit comments