fix(terminal): contain IME composition layout
This commit is contained in:
@@ -221,6 +221,18 @@ describe('TerminalPanel', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('contains IME composition layout inside the terminal', () => {
|
||||
expect(terminalStylesheet).toMatch(
|
||||
/\.terminal-panel__emulator\s*\{[^}]*contain:\s*size layout paint;[^}]*overflow-anchor:\s*none;/u
|
||||
)
|
||||
expect(terminalStylesheet).toMatch(
|
||||
/\.terminal-panel__emulator \.xterm\s*\{[^}]*width:\s*100%;[^}]*max-width:\s*100%;[^}]*overflow:\s*hidden;/u
|
||||
)
|
||||
expect(terminalStylesheet).toMatch(
|
||||
/\.terminal-panel__emulator \.xterm-helpers\s*\{[^}]*max-width:\s*0;[^}]*overflow:\s*visible;/u
|
||||
)
|
||||
})
|
||||
|
||||
it('creates only after the first valid fitted size and forwards input', async () => {
|
||||
const backend = adapterHarness()
|
||||
const emulator = emulatorHarness()
|
||||
|
||||
@@ -116,11 +116,24 @@
|
||||
flex: 1;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
contain: size layout paint;
|
||||
overflow-anchor: none;
|
||||
background: var(--surface-canvas);
|
||||
}
|
||||
|
||||
.terminal-panel__emulator .xterm {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* IME composition must stay inside the terminal's own scroll boundary. */
|
||||
.terminal-panel__emulator .xterm-helpers {
|
||||
max-width: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.terminal-panel__status {
|
||||
|
||||
Reference in New Issue
Block a user