On Tue, 14 Oct 2025 16:26:24 GMT, Nizar Benalla <[email protected]> wrote:
>> Please review this patch to add a toggle to order the member details in the >> table of contents in lexical order. The selected choice is stored and >> preserved. >> >> Here is a preview of the new toggle. >> >> >> https://github.com/user-attachments/assets/55c81e4b-5fc0-416e-8946-53aede419640 > > Nizar Benalla has updated the pull request incrementally with one additional > commit since the last revision: > > remove redundant css src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/script.js.template line 808: > 806: reorderMemberDetailsAlpha(); > 807: allTocNavs().forEach(sortTocAlpha); > 808: initSectionData(); prevHash = null; handleScroll(); We should not set `prefHash = null` here and in the method below. It causes the TOC to scroll even if the viewed section has not changed, which is not useful. Imagine a user loading a class page, scrolling the TOC down to method details, realizing that method details are sorted in source order, and clicking the "Sort" button. Moving the TOC back up to the beginning is not useful, it should remain at its current position. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26322#discussion_r2432548173
