zmachine: fixed focus on chrome

This commit is contained in:
Steven Hugg 2020-07-10 23:27:31 -05:00
parent c1e83c3a03
commit c99f4c4d3a
1 changed files with 3 additions and 1 deletions

View File

@ -785,9 +785,11 @@ class ZmachinePlatform implements Platform {
});
inputline.on('focus', (e) => {
this.glk.focused = true;
console.log('inputline gained focus');
});
inputline.on('blur', (e) => {
$("#workspace").on('click', (e) => {
this.glk.focused = false;
console.log('inputline lost focus');
});
windowport.on('click', (e) => {
inputline.focus();