changeset 55632:72b637d53318

8221366: Search box tries to search for "Search" Reviewed-by: jjg
author hannesw
date Mon, 01 Apr 2019 16:51:09 +0200
parents a8564226f446
children 3d8934bf505a
files src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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"