summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2015-09-21 14:21:48 +0200
committerLukas Rytz <lukas.rytz@typesafe.com>2015-09-21 14:21:48 +0200
commit7f1defca22b719b16814626b0218d12e24d5f149 (patch)
treebca99a9a05251a4dba752142acb6e0be3a44a497 /src
parent1986ed28b64d3d707335050022aa972c95c3a7f7 (diff)
parentdaf557a567e99521829618a11237d4d987122d5f (diff)
downloadscala-7f1defca22b719b16814626b0218d12e24d5f149.tar.gz
scala-7f1defca22b719b16814626b0218d12e24d5f149.tar.bz2
scala-7f1defca22b719b16814626b0218d12e24d5f149.zip
Merge pull request #4736 from gourlaysama/ticket/t9429
SI-9429 fix filtering in scaladoc after focusing on a package
Diffstat (limited to 'src')
-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;