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

TOC vertical offsets not updated when document size changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 23
    • tools
    • b12
    • generic
    • generic

      The table of contents in `javadoc`-generated API documentation keeps track of vertical offset of elements in the current page in order to highlight the currently viewed element. Page offsets are updated when the size of the browser changes, but not when the size of the document body changes for other reasons, such as selecting a subgroup of methods in the "Method Summary" table of a class or interface.

      Instead of just handling changes in browser size, we should handle all changes of size of the document body element. This can be done by using the ResizeObserver API[1] which has been implemented in all supported browsers for several years.

      [1]: https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver

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

              Created:
              Updated:
              Resolved: