~ + Tab -> Focus lost (onKeyDown_ triggered twice for Tab key) #1341
Labels
help wanted
Contributions wanted towards the issue
🐛 Type: Bug
Issue pertains to something wrong within Hyper
Issue
The problem is : If a "composition", beginning with
~
for example, is ended withTab
and notSpace
, Term loose focus (hyperCaret receive ablur
event).After blur event, if I press
Tab
twice, focus come back. (same as #1273)More interesting: If I have another pane, focus goes to the other pane (without highlight menu) !! After that, If a do the same on the other pane, focus disappear, press 'tab' twice and he goes back to first pane.
I tracked down this bug and it drove me nuts...
Here is what I found:
onKeyDown_
function is called twice with the same event (same e.timeStamp value). If preventDefault() is called on it, blur do not happen.I tried to debug step by step BUT if I add a breakpoint in
onTextInput_
function, this bug disappear 😱Difference I noticed:
Without breakpoint HyperCarret
input
eventListener is called right afterSESSION_USER_DATA
redux action and beforeSESSION_ADD_DATA
action.But with a breakpoint, the call occurs after
SESSION_ADD_DATA
andSESSION_PTY_DATA
actionsMaybe, webview think that I have
Alt
pressed withTab
. And in ChromeAlt+Tab
give focus to the next Link. So Caret and Tabheader maybe ?If someone can help me, because I'm on the brink of sending a PR with this ugly
e.preventDefault();
😂The text was updated successfully, but these errors were encountered: