Skip to content

Commit

Permalink
Don't re-append the inputel in line input mode
Browse files Browse the repository at this point in the history
This fixes to a large extent the rapid race condition flashing of the keyboard reported in erkyrath/quixe#32
  • Loading branch information
curiousdannii committed Nov 7, 2018
1 parent a6ba3a2 commit 1817d63
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions glkote.js
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,6 @@ function accept_inputset(arg) {
inputel.on('focus', win.id, evhan_input_focus);
inputel.on('blur', win.id, evhan_input_blur);
inputel.data('winid', win.id);
win.inputel = inputel;
win.historypos = win.history.length;
win.needscroll = true;
}
Expand All @@ -1456,7 +1455,8 @@ function accept_inputset(arg) {
width = maxwidth;
inputel.css({ position: 'absolute',
left: xpos+'px', top: pos.top+'px', width: width+'px' });
win.frameel.append(inputel);
if (!win.inputel)
win.frameel.append(inputel);
}

if (win.type == 'buffer') {
Expand All @@ -1479,8 +1479,11 @@ function accept_inputset(arg) {
/* ### opera absolute positioning failure? */
inputel.css({ position: 'absolute',
left: '0px', top: '0px', width: width+'px' });
cursel.append(inputel);
if (!win.inputel)
cursel.append(inputel);
}

win.inputel = inputel;
});
}

Expand Down

0 comments on commit 1817d63

Please sign in to comment.