fix(FN-1235): restore terminal text input interaction
- Remove the xterm pointer-events override from dashboard styles to allow terminal text input focus and typing - Add a terminal input CSS contract test to guard against regressions in xterm helper element interactivity - Add a patch changeset for @gsxdsm/fusion documenting the terminal text input fix
This commit is contained in:
5
.changeset/fix-terminal-text-input.md
Normal file
5
.changeset/fix-terminal-text-input.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@gsxdsm/fusion": patch
|
||||
---
|
||||
|
||||
Fix terminal text input not working — remove pointer-events: none from xterm helper textarea CSS override.
|
||||
40
packages/dashboard/app/__tests__/terminal-input.test.ts
Normal file
40
packages/dashboard/app/__tests__/terminal-input.test.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { readFileSync } from "fs";
|
||||
import { resolve } from "path";
|
||||
|
||||
const css = readFileSync(resolve(__dirname, "../styles.css"), "utf-8");
|
||||
|
||||
function findHelperTextareaRule(): string {
|
||||
const match = css.match(
|
||||
/\.terminal-xterm\s+\.xterm\s+\.xterm-helper-textarea\s*\{([^}]*)\}/,
|
||||
);
|
||||
return match?.[1] ?? "";
|
||||
}
|
||||
|
||||
describe("terminal helper textarea CSS contract", () => {
|
||||
it("defines the xterm helper textarea rule", () => {
|
||||
const ruleBody = findHelperTextareaRule();
|
||||
expect(ruleBody).not.toBe("");
|
||||
});
|
||||
|
||||
it("keeps mobile-friendly helper textarea dimensions", () => {
|
||||
const ruleBody = findHelperTextareaRule();
|
||||
expect(ruleBody).toMatch(/width:\s*1px\b/);
|
||||
expect(ruleBody).toMatch(/height:\s*1px\b/);
|
||||
});
|
||||
|
||||
it("does not disable pointer events on the helper textarea", () => {
|
||||
const ruleBody = findHelperTextareaRule();
|
||||
expect(ruleBody).not.toMatch(/pointer-events\s*:\s*none\b/);
|
||||
});
|
||||
|
||||
it("positions the helper textarea off-screen", () => {
|
||||
const ruleBody = findHelperTextareaRule();
|
||||
expect(ruleBody).toMatch(/top:\s*-9999px\b/);
|
||||
});
|
||||
|
||||
it("keeps the helper textarea invisible", () => {
|
||||
const ruleBody = findHelperTextareaRule();
|
||||
expect(ruleBody).toMatch(/opacity:\s*0\b/);
|
||||
});
|
||||
});
|
||||
@@ -8413,7 +8413,6 @@ body {
|
||||
width: 1px !important;
|
||||
height: 1px !important;
|
||||
opacity: 0 !important;
|
||||
pointer-events: none !important;
|
||||
z-index: -1 !important;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user