AIRBRIDGE DEV BLOG

copy test

const hasUserGestureContext = () => { const textarea = document.createElement('textarea') textarea.readOnly = true textarea.contentEditable = true textarea.style.position = 'fixed' textarea.value = ' ' textarea.hidden = true document.body.appendChild(textarea) const range = document.createRange() range.selectNodeContents(textarea) const selection = document.getSelection() selection.removeAllRanges() selection.addRange(range) textarea.setSelectionRange(0, textarea.value.length)