Problem with utils.copyToClipboard()

This is not new as we discussed it in Office Hours yesterday. However I wanted to report further (lack of) "progress" and keep it on the radar.

I significantly refactored the problem event handler as there were all kinds of things about it that did not actually work. Most interestingly, a database read that fails still leaves the old data in .data so tests for null, zero, length, undefined, etc. all "succeed" even if the read fails. But I digress. This new code "works" except for the noted issue.

utils.copyToClipboard('foo'); // this works; when we exit 'foo' will be on the clipboard

var x = await azure_share_check.trigger();

console.log('count=' + x['cnt'][0]);

if (x['cnt'][0] == 0) {
    await azure_share_upsert.trigger();

var y = await azure_share_read.trigger();

console.log('y=' + y['share-guid'][0].toLowerCase());

var s = ('' + y['share-guid'][0].toLowerCase());


// this code is broken right now; does nothing

Note that at least in console mode banners fly by at the top of the screen. The copy of 'foo' to the clipboard goes by first. And then lots of messages about the queries running. Then the copy to clipboard of the long string s goes by. The string is correctly displayed in the pop up message but the actual clipboard does not change from the 'foo' that was set when we entered.

One more note. When we were looking at this yesterday copyToClipboard worked when the data was found in the cache and it failed when the queries that encached the data ran. This seem quite consistent yesterday. But with this refactored code that does not seem to matter. The copyToClipboard at the bottom now fails 100% of the time as far as I have seen; regardless of what code runs above it.

Hey @Roland_Alden! Thank you for documenting this. Would you be up for a call sometime to take a look at this? A call would probably be most helpful since you have to clear your cache every time we want to try reproducing the issue and we don't want to bug you with a message every time we'd like it to be cleared :sweat_smile:

No problem. I am free 95% of the time so anyone can just ping me on chat or send an email 15 minutes beforehand and I'll likely be available.