The grid (core) ยท console.warn
the clipboard could not be read; handle the paste event and pass event.clipboardData instead
Printed by The grid (core), prefixed [lattice], since 1.6.0.
Warnings reference › clipboard/no-read
- Identifier
clipboard/no-read- Raised by
- The grid (core)
- Since
- 1.6.0
What happened
The asynchronous clipboard read is unavailable or was denied - no navigator.clipboard, an insecure context, or the user refused permission. null is returned and nothing is pasted.
The fix
Read the clipboard from a real paste event, where the data is available without permission, and hand the text to the grid.
The smallest fix
el.addEventListener('paste', (e) => grid.clipboard.paste(e.clipboardData.getData('text/plain')));
Reference
Covered in full at the API reference.