Skip to content

Commit

Permalink
fix(html): trigger filter on page load (#1413)
Browse files Browse the repository at this point in the history
In the HTML report, if the "filter" input contains a value when
the page loads, it is ignored.  This happens even though an event
is actually created on start-up to trigger the refresh.

I believe this is a regression introduced in
9a1954a, when the observed
events changed from "keyup change" to "input".
  • Loading branch information
marc-legendre committed Aug 6, 2022
1 parent 568916d commit 070d61c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coverage/htmlfiles/coverage_html.js
Expand Up @@ -166,7 +166,7 @@ coverage.wire_up_filter = function () {

// Trigger change event on setup, to force filter on page refresh
// (filter value may still be present).
document.getElementById("filter").dispatchEvent(new Event("change"));
document.getElementById("filter").dispatchEvent(new Event("input"));
};

coverage.INDEX_SORT_STORAGE = "COVERAGE_INDEX_SORT_2";
Expand Down

0 comments on commit 070d61c

Please sign in to comment.