The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
So if developers are working locally on insecure context, copy button will fail. I believe I was working with https when I was adding this feature back then, so I didn't really catch the bug.
So I'm sending a fix PR to add a fallback to insecure context or old browsers.
Related GitHub issue(s)
7237
Testing instructions
Spin up a local site without https
Find the copy button
Click the button, now the field name will be copied.
Screenshots / screencast
Changelog text for these changes
Bug: Copy button now works correctly in secure context. #7237 (@heybran)
PR checklist
[x] I have tested my own code to confirm it works as I intended.
Description
Copy button near field name previously was using
navigator.clipboard.writeText
, but I just found out that the API is only available for secure context: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeTextSo if developers are working locally on insecure context, copy button will fail. I believe I was working with https when I was adding this feature back then, so I didn't really catch the bug.
So I'm sending a fix PR to add a fallback to insecure context or old browsers.
Related GitHub issue(s)
7237
Testing instructions
Screenshots / screencast
Changelog text for these changes
Bug: Copy button now works correctly in secure context. #7237 (@heybran)
PR checklist