Describe the bug
Clicking on another element on the page does not move focus to that element, instead focus remains on the terminal. This is because we are using document.onclick to maintain terminal focus.
To Reproduce
Add react-terminal-ui to page
Add another element like an input
Try to click on the input
Notice focus does not go to input, but remains on terminal
Expected behavior
It should be possible to focus on other elements on the page. We should avoid using document.onclick.
Describe the bug Clicking on another element on the page does not move focus to that element, instead focus remains on the terminal. This is because we are using
document.onclick
to maintain terminal focus.To Reproduce
Expected behavior It should be possible to focus on other elements on the page. We should avoid using
document.onclick
.Screenshots N/A
Additional context Originally discussed in https://github.com/jonmbake/react-terminal-ui/pull/1.