Skip to content

Commit 7f1defc

Browse files
committed
Merge pull request scala#4736 from gourlaysama/ticket/t9429
SI-9429 fix filtering in scaladoc after focusing on a package
2 parents 1986ed2 + daf557a commit 7f1defc

File tree

1 file changed

+11
-1
lines changed
  • src/scaladoc/scala/tools/nsc/doc/html/resource/lib

1 file changed

+11
-1
lines changed

src/scaladoc/scala/tools/nsc/doc/html/resource/lib/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,17 @@ function textFilter() {
412412
var query = $("#textfilter input").attr("value") || '';
413413
var queryRegExp = compilePattern(query);
414414

415-
if ((typeof textFilter.lastQuery === "undefined") || (textFilter.lastQuery !== query)) {
415+
// if we are filtering on types, then we have to display types
416+
// ("display packages only" is not possible when filtering)
417+
if (query !== "") {
418+
kindFilter("all");
419+
}
420+
421+
// Three things trigger a reload of the left pane list:
422+
// typeof textFilter.lastQuery === "undefined" <-- first load, there is nothing yet in the left pane
423+
// textFilter.lastQuery !== query <-- the filter text has changed
424+
// focusFilterState != null <-- a package has been "focused"
425+
if ((typeof textFilter.lastQuery === "undefined") || (textFilter.lastQuery !== query) || (focusFilterState != null)) {
416426

417427
textFilter.lastQuery = query;
418428

0 commit comments

Comments
 (0)