Skip to content

Commit 50380ad

Browse files
committed
client search code: stop event propagation when navigating
Fixes #3172
1 parent c22e5e7 commit 50380ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web/search.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ void initializeSearch(
355355
var href = suggestionElements[selectingElement].dataset['href'];
356356
if (href != null) {
357357
window.location.assign('$_htmlBase$href');
358+
event.stopPropagation();
358359
}
359360
return;
360361
}
@@ -365,6 +366,8 @@ void initializeSearch(
365366
var search = Uri.parse(relativePath());
366367
search = search.replace(queryParameters: {'q': input});
367368
window.location.assign(search.toString());
369+
event.stopPropagation();
370+
return;
368371
}
369372
}
370373

0 commit comments

Comments
 (0)