mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-30 16:39:33 +01:00
fix(mobile): the phone toolbar sits on the keyboard, and the prompt's last line is no longer under it
With the on-screen keyboard up, the toolbar and the keyboard accessory bar kept a bottom offset of --safe-area-bottom (34px on a Face ID iPhone, since the page sets viewport-fit=cover), although the keyboard covers the home-indicator strip that inset reserves. That left an empty band between the toolbar and the keyboard, and put the bars 34px above the room main's keyboard padding reserves for them (84px, the two bars only), so the bottom of the terminal box, the last line of the prompt being typed, was painted under the accessory bar. With the keyboard up the bars now stack from 0 (toolbar), 40px (accessory bar) and 84px (CJK textarea), on iOS Safari and in the home-screen app alike. Nothing changes with the keyboard down, on a tablet or on desktop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e99b42c387
commit
e4a85fabcd
3 files changed
+176
-6
No files matched your search
@@ -1039,15 +1039,30 @@ html.mobile-init .file-browser-panel {
|
||||
bottom: calc(var(--safe-area-bottom) + var(--chrome-overlap, 0px));
|
||||
}
|
||||
|
||||
/* When keyboard is visible the JS translateY already accounts for the full
|
||||
distance from the visual-viewport bottom to the layout-viewport bottom
|
||||
(keyboard + Safari bar). Remove the CSS Safari-bar offset to avoid
|
||||
double-counting, which otherwise creates a visible gap above the keyboard. */
|
||||
/* With the keyboard up the bars sit directly on it. The JS translateY already
|
||||
lifts them by the whole distance from the layout-viewport bottom to the
|
||||
visual-viewport bottom (keyboard, plus Safari's bar where there is one), so
|
||||
the Safari-bar offset is not added again here. Nor is the bottom safe area:
|
||||
the keyboard covers the home-indicator strip it reserves. Keeping it (34px
|
||||
on a Face ID iPhone, since the page sets viewport-fit=cover) left an empty
|
||||
band between the toolbar and the keyboard, and worse, pushed the bars 34px
|
||||
above the box main's keyboard padding reserves for them (84px, the two
|
||||
bars only, set by KeyboardHandler), so the terminal's last row, the end of
|
||||
the prompt being typed, was painted under the accessory bar. The second
|
||||
selector of each pair outranks `.ios-device.safari-browser .toolbar`. */
|
||||
.keyboard-visible .toolbar,
|
||||
.keyboard-visible.ios-device.safari-browser .toolbar {
|
||||
bottom: var(--safe-area-bottom);
|
||||
bottom: 0;
|
||||
}
|
||||
.keyboard-visible .keyboard-accessory-bar,
|
||||
.keyboard-visible.ios-device.safari-browser .keyboard-accessory-bar {
|
||||
bottom: calc(var(--safe-area-bottom) + 40px);
|
||||
bottom: 40px;
|
||||
}
|
||||
/* The CJK textarea stacks on the accessory bar, so it drops the same strip
|
||||
(styles.css adds --safe-area-bottom for every touch device; on an iPad the
|
||||
JS sets `bottom` inline and this rule never applies, being phone-only). */
|
||||
.touch-device.keyboard-visible #cjkInput.cjk-input-visible {
|
||||
bottom: 84px;
|
||||
}
|
||||
|
||||
/* Show case selector in center */
|
||||
|
||||
Reference in new issue
Block a user