}
});
+ // Fix selecting trailing element on triple (or quad) click, resulting in a trailing tab or newline
+ // when copying text from the table.
+ addEventListener('click', e => {
+ if (e.detail >= 3 && tableBody.contains(e.target)) {
+ const selection = getSelection();
+ const range = selection.getRangeAt(0);
+ const textNode = e.target.firstChild;
+ range.setStart(textNode, 0);
+ range.setEnd(textNode, textNode.length);
+ };
+ });
+
// Set initial bytecode from prepopulated contract
contractInput.dispatchEvent(new Event('input'));
</script>