Snippet copy feature should use button instead of link

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: None
    • Component/s: tools
    • None

      The copy-to-clipboard feature introduced in JDK-8275406 uses a somewhat flimsy mechanism as its user interface. It is implemented as a `<a>` element with `href="#"` and an `onclick` handler. While this works within the javadoc generated documentation, the same markup redirects to the top of the page in other HTML contexts. What is more, a link element is not the appropriate element type for this feature as links are meant to redirect to a new page or section.

      A `<button>` element would be a better match as buttons are meant allow the user to trigger actions. In the process of reimplementing the feature using a button we should also get rid of the ::before CSS pseudo-element use.

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: