Ontotext-AD / graphdb-workbench

The web application for GraphDB APIs
Other
45 stars 16 forks source link

GDB-10897 - Import page "copy" button fallback added for non-secure contexts #1577

Closed DesiBorisova closed 1 month ago

DesiBorisova commented 1 month ago

What?

When the Workbench is opened in a way, which doesn't have a secure context, or if navigator.clipboard is not supported, the text copying functionality will still work.

Why?

Some copy buttons in the WB did not work when the document was not in a secure context.

How?

I added a fallback option using document.execCommand('copy');, as used in other views (e.g. repository URL copy button).

sonarcloud[bot] commented 1 month ago

Quality Gate Failed Quality Gate failed for 'graphdb-workbench'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
3.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud