Skip to content

Commit 22facbb

Browse files
authored
client search code: stop event propagation when navigating (#3185)
Fixes #3172
1 parent c22e5e7 commit 22facbb

File tree

4 files changed

+39
-34
lines changed

4 files changed

+39
-34
lines changed

lib/resources/docs.dart.js

Lines changed: 33 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/resources/docs.dart.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

web/sig.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
601162D8EAA11155F46C514701DFD837
1+
8625029CD25C5F7BE8E31E28C5B97F97

0 commit comments

Comments
 (0)