keyboard focus: blur/focus toggle
All checks were successful
/ mirror_to_github (push) Successful in 36s
/ test (push) Successful in 9s

This commit is contained in:
Leon van Kammen 2025-06-25 18:51:43 +02:00
parent b3fdd67ee3
commit 2b3c41fa6e
2 changed files with 8 additions and 1 deletions

View file

@ -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'] ){

View file

@ -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;