Page 1 of 1
Copy-BP button fails randomly, and ever more often
Posted: Fri May 07, 2021 3:10 am
by quyxkh
I've tried in Firefox and Chrome Beta and Chromium, I can hit the "copy to clipboard" button on for instance GitHub and the repo url gets copied to the clipboard, but hitting the sweet blue BP button on this forum now does nothing. So it looks to me like there's something about copying to the clipboard that GitHub knows that phpbb doesn't.
edited title to incorporate comments from eradicator and davemcw: it's not os specific at all, modern web engines are exposing a race in the button setup code more and more often.
Re: Copy-BP button does not work on GNOME 40
Posted: Fri May 07, 2021 3:35 am
by eradicator
The bp button has never worked for me on Firefox. (But with the number of addons I have I never blamed that on the forum.)
Re: Copy-BP button does not work on GNOME 40
Posted: Fri May 07, 2021 3:48 am
by DaveMcW
It seems to randomly fail for me. For example, in
this post the first blueprint works and the second one does not.
Looking at the DOM inspector, the working button has id="BPbutton_oqyoxohfk" while the broken button has id="BPbutton". This means javascript failed to activate the button, it is not an OS copy/paste problem.
It is easy to see why it fails, every button starts with id="BPbutton" as the page loads. Then there is a race condition to activate the button's <script> block before another button loads. I am amazed that it works as often as it does.
Re: Copy-BP button fails randomly, and ever more often
Posted: Sat May 22, 2021 8:18 am
by ssilk
I guess this works randomly, because the script looks just for one class. If meanwhile more content is loaded, the script oversees it.
Re: Copy-BP button fails randomly, and ever more often
Posted: Mon May 24, 2021 12:39 pm
by Sanqui
I've fixed the button when there are multiple blueprint strings on the same page :) But it may be necessary to edit and re-save old posts.