diff --git a/internal/gui/assets/plugins/routing/client.js b/internal/gui/assets/plugins/routing/client.js index b33c22564..6c9407f5f 100644 --- a/internal/gui/assets/plugins/routing/client.js +++ b/internal/gui/assets/plugins/routing/client.js @@ -2324,10 +2324,13 @@ function routingPage(part) { // once, as it is then (the list coming in under it can take a // scrollbar's width off it before the first live request) const STORY_HELD = 3; - let storyHold = { key: "", told: new Map() }, storyDrawn = ""; + let storyHold = { key: "", told: new Map() }, storyDrawn = "", storyW = 0; function holdStory() { const follow = !pinned && !rp && !day; - const w = steps.clientWidth; + // the width as the observer below last found it: read here, it laid + // the whole page out again on each of the story's ten draws a second, + // half of what the story took with two folds open in WebKit (#3164) + const w = storyW; const key = JSON.stringify([follow, w, document.documentElement.lang]); if (key === storyHold.key && storyDrawn === headKey + stepsKey) return; if (key !== storyHold.key) storyHold = { key, told: new Map() }; @@ -2345,7 +2348,7 @@ function routingPage(part) { }); } // grown since it was measured (a font come in): measured again as it is - new ResizeObserver(() => { storyDrawn = ""; holdStory(); }).observe(steps); + new ResizeObserver(() => { storyW = steps.clientWidth; storyDrawn = ""; holdStory(); }).observe(steps); // renderCtx draws the request's context window under its story, with // its session's prompts request by request; drawn again only when what // it shows changes. Live, the next request is patched into the card