mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
make submission header buttons native
This commit is contained in:
1 parent
359f695eb5
commit
9abdb68bc5
5 files changed
+79
-55
No files matched your search
@@ -6,7 +6,9 @@ export default class extends HTMLElement {
|
||||
const text = this.dataset.text || this.innerText.trim()
|
||||
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(text)
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
window.webkit?.messageHandlers?.flash?.postMessage({ style: 'notice', message: this.dataset.copied })
|
||||
})
|
||||
} else {
|
||||
if (e.target.tagName !== 'INPUT') {
|
||||
alert(`Clipboard not available. Make sure you're using https://\nCopy text: ${text}`)
|
||||
|
||||
Reference in new issue
Block a user