summaryrefslogtreecommitdiff
path: root/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/scaladoc/scala/tools/nsc/doc/html/resource/lib/index.js')
-rw-r--r--src/scaladoc/scala/tools/nsc/doc/html/resource/lib/index.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/index.js b/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/index.js
index 3d9cf8d465..cf81f7fdf5 100644
--- a/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/index.js
+++ b/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/index.js
@@ -412,7 +412,17 @@ function textFilter() {
var query = $("#textfilter input").attr("value") || '';
var queryRegExp = compilePattern(query);
- if ((typeof textFilter.lastQuery === "undefined") || (textFilter.lastQuery !== query)) {
+ // if we are filtering on types, then we have to display types
+ // ("display packages only" is not possible when filtering)
+ if (query !== "") {
+ kindFilter("all");
+ }
+
+ // Three things trigger a reload of the left pane list:
+ // typeof textFilter.lastQuery === "undefined" <-- first load, there is nothing yet in the left pane
+ // textFilter.lastQuery !== query <-- the filter text has changed
+ // focusFilterState != null <-- a package has been "focused"
+ if ((typeof textFilter.lastQuery === "undefined") || (textFilter.lastQuery !== query) || (focusFilterState != null)) {
textFilter.lastQuery = query;