Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8266808: Search label still uses old search field id
Reviewed-by: prappo
  • Loading branch information
hns committed May 12, 2021
1 parent 06d7602 commit 97367c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Expand Up @@ -558,11 +558,12 @@ private void addHelpLink(Content tree) {
}

private void addSearch(Content tree) {
String searchValueId = "search";
String search = "search";
String reset = "reset";
HtmlTree inputText = HtmlTree.INPUT("text", HtmlIds.SEARCH_INPUT, searchValueId);
HtmlTree inputText = HtmlTree.INPUT("text", HtmlIds.SEARCH_INPUT, search);
HtmlTree inputReset = HtmlTree.INPUT(reset, HtmlIds.RESET_BUTTON, reset);
HtmlTree searchDiv = HtmlTree.DIV(HtmlStyle.navListSearch, HtmlTree.LABEL(searchValueId, searchLabel));
HtmlTree searchDiv = HtmlTree.DIV(HtmlStyle.navListSearch,
HtmlTree.LABEL(HtmlIds.SEARCH_INPUT.name(), searchLabel));
searchDiv.add(inputText);
searchDiv.add(inputReset);
tree.add(searchDiv);
Expand Down
5 changes: 3 additions & 2 deletions test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -26,6 +26,7 @@
* @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881
* 8181622 8182263 8074407 8187521 8198522 8182765 8199278 8196201 8196202
* 8184205 8214468 8222548 8223378 8234746 8241219 8254627 8247994 8263528
* 8266808
* @summary Test the search feature of javadoc.
* @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
Expand Down Expand Up @@ -419,7 +420,7 @@ void checkSearchOutput(String fileName, boolean expectedOutput, boolean moduleDi
loadScripts(document, 'script');""",
"<div class=\"nav-list-search\">",
"""
<label for="search">SEARCH:</label>
<label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
""");
Expand Down

1 comment on commit 97367c0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.