@cplieger/web-terminal-ui 6.1.4 → 6.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cplieger/web-terminal-ui",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reference touch-first browser UI for @cplieger/web-terminal-engine: a composable kernel + feature modules (tabs, activity monitor, mobile toolbar, context menu, IME, predictive echo, viewport handling) and CSS. One createTerminal() call.",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@stryker-mutator/vitest-runner": "10.0.0",
|
|
53
53
|
"@types/node": "26.2.0",
|
|
54
54
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
55
|
-
"@vitest/coverage-v8": "4.1.
|
|
55
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
56
56
|
"eslint": "10.8.1",
|
|
57
57
|
"fast-check": "4.9.0",
|
|
58
58
|
"happy-dom": "20.11.2",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"stylelint-config-standard": "40.0.0",
|
|
64
64
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
65
65
|
"typescript-eslint": "8.67.0",
|
|
66
|
-
"vitest": "4.1.
|
|
66
|
+
"vitest": "4.1.11"
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
@@ -47,7 +47,16 @@ export function scrollToBottom(): TerminalFeature {
|
|
|
47
47
|
ctx.scroll.scrollToBottom();
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
// Target the MAXIMUM offset, not scrollHeight. An over-scroll target is
|
|
51
|
+
// one clientHeight past the end and needs the container to clamp it,
|
|
52
|
+
// which is the assumption the engine's own bottom writes stopped making:
|
|
53
|
+
// clamping an offset the content shrank out from under is an
|
|
54
|
+
// implementation behaviour and WebKit does not do it. The line above
|
|
55
|
+
// already computes the maximum, so this is the same arithmetic said once.
|
|
56
|
+
surface.scrollTo({
|
|
57
|
+
top: surface.scrollHeight - surface.clientHeight,
|
|
58
|
+
behavior: "smooth",
|
|
59
|
+
});
|
|
51
60
|
};
|
|
52
61
|
|
|
53
62
|
// pointerdown (like the toolbar keys) so touch devices get the jump on the
|
package/src/kernel/kernel.ts
CHANGED
|
@@ -811,7 +811,12 @@ function buildTerminal(
|
|
|
811
811
|
case "scroll-down": {
|
|
812
812
|
ev.preventDefault();
|
|
813
813
|
const h = termWrap.clientHeight;
|
|
814
|
-
|
|
814
|
+
// The ceiling is the maximum offset, not scrollHeight: the latter is one
|
|
815
|
+
// clientHeight past the end, so a page-down near the bottom handed the
|
|
816
|
+
// container an out-of-range offset and relied on it to clamp. Same
|
|
817
|
+
// reasoning as the engine's bottom writes.
|
|
818
|
+
const max = Math.max(0, termWrap.scrollHeight - h);
|
|
819
|
+
termWrap.scrollTop = Math.min(max, termWrap.scrollTop + h);
|
|
815
820
|
return true;
|
|
816
821
|
}
|
|
817
822
|
case "ignore":
|