fix: focus xterm terminal on tap instead of hidden input
- Use term.focus() instead of hidden input focus - This ensures keyboard opens properly when tapping anywhere on terminal
This commit is contained in:
@@ -275,10 +275,10 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
// Focus hidden input on mobile to keep keyboard open
|
||||
// Focus terminal on mobile to keep keyboard open
|
||||
const handleTerminalClick = () => {
|
||||
if (isMobile && hiddenInputRef.current) {
|
||||
hiddenInputRef.current.focus();
|
||||
if (isMobile && termRef.current) {
|
||||
termRef.current.focus();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user