Wednesday, November 28, 2018

Select and copy text from a react material ui TextField

For some reason I could not access the underlying input element, so  I added a hidden input element to the page, copied the textfield content to it and then copied it from there:

$('#copy').show();
$('#copy').focus();
$('#copy').val(this.state.input);
$('#copy').select();
document.execCommand('copy')
$('#copy').hide();

Friday, November 9, 2018

uBlock element blocking does nothing, no popup

I checked ublock status and it showed only question marks, so there was a bigger problem somewhere. Restarting the browser fixed it.