Commit 5adf0808 authored by Douwe Maan's avatar Douwe Maan

Don't copy if there's nothing to copy

parent bc3448fc
......@@ -239,6 +239,8 @@
let selectedDocument = selection.getRangeAt(0).cloneContents();
if (!selectedDocument) return;
if (selectedDocument.textContent.length === 0) return;
e.preventDefault();
clipboardData.setData('text/plain', selectedDocument.textContent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment