8221366: Search box tries to search for "Search"
authorhannesw
Mon, 01 Apr 2019 16:51:09 +0200
changeset 54358 72b637d53318
parent 54357 a8564226f446
child 54359 3d8934bf505a
8221366: Search box tries to search for "Search" Reviewed-by: jjg
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js
test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js	Mon Apr 01 16:49:34 2019 +0200
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js	Mon Apr 01 16:51:09 2019 +0200
@@ -77,7 +77,7 @@
             $(this).val(watermark).addClass('watermark');
         }
     });
-    $("#search").on('click keydown', function() {
+    $("#search").on('click keydown paste', function() {
         if ($(this).val() == watermark) {
             $(this).val('').removeClass('watermark');
         }
--- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Mon Apr 01 16:49:34 2019 +0200
+++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java	Mon Apr 01 16:51:09 2019 +0200
@@ -625,7 +625,7 @@
                 "function concatResults(a1, a2) {",
                 "if (exactMatcher.test(item.l)) {\n"
                 + "                        presult.push(item);",
-                "$(\"#search\").on('click keydown', function() {\n"
+                "$(\"#search\").on('click keydown paste', function() {\n"
                 + "        if ($(this).val() == watermark) {\n"
                 + "            $(this).val('').removeClass('watermark');\n"
                 + "        }\n"