diff --git a/com/isoterminal.js b/com/isoterminal.js index 403ddd5..4744245 100644 --- a/com/isoterminal.js +++ b/com/isoterminal.js @@ -390,6 +390,14 @@ if( typeof AFRAME != 'undefined '){ const focus = (e) => { + if( event.target == document.activeElement ){ + // if we're already focused, the keyboard is already triggerend + // therefore we blur() the element for correctness + // which allows the WebXR keyboard dissappear if implemented at all + // [Meta Quest 2 does not do this] + event.target.blur() + } + // calculate distance between thumb and indexfinger to detect pinch // which should prevent focus-event (annoying to have keyboard popping up during pinch) if( e.detail?.withEl?.components['hand-tracking-controls'] ){ diff --git a/com/isoterminal/term.js b/com/isoterminal/term.js index d0fc3a2..0af741f 100644 --- a/com/isoterminal/term.js +++ b/com/isoterminal/term.js @@ -1259,7 +1259,6 @@ Term.prototype.blurHandler = function (ev) Term.prototype.pasteHandler = function (ev) { - debugger var c, str; if (!this.textarea_has_focus) { c = ev.clipboardData;