Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8325650

Table of contents scroll timeout not long enough

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 23
    • 23
    • tools
    • b10
    • generic
    • generic

    Description

      The table of contents added in JDK-8320458 implements a scroll-following by highlighting the currently viewed page section in the TOC. When clicking on an item in the TOC we use smooth scrolling to navigate to the target anchor. For this case we temporarily disable the scroll-following as it would cause the TOC selection to flicker by selecting in-between items. This is done using a JavaScript timeout that renews itself until the scroll destination is reached.

      The timeout value used is currently 50 milliseconds which worked well on all browsers I tested it on. However, when using the feature under load (for example when running a build or test in the background) I sometimes experience stuttering or flickering when clicking on a TOC link, and it seems likely that this could also happen on older/slower computers. It turns out that increasing the timeout value to something like 100 milliseconds fixes the problem without any negative consequences.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: