ubject: Issue with copying referral link in Kodular WebView
Hello community members,
I’m currently developing an app using Kodular App Builder, and I’m facing an issue with copying a referral link in the WebView component. I’d appreciate any assistance or guidance you can provide.
In my app, I’m using the WebView to display a website that contains a button responsible for copying a referral link to the clipboard. The button works fine when I visit the website in a regular browser, but when I load the website within the Kodular app’s WebView, it doesn’t copy the link to the clipboard.
Here’s the relevant code snippet of the website
<script>
window.copyButton = function copyButton(link, id) {
navigator.clipboard.writeText(link);
document.getElementById(id).innerText = "Copied";
setTimeout(function() {
document.getElementById(id).innerText = "Copy";
}, 2000);
};
</script>
<button class="col-12" id="copy-link-btn" type="button" onclick="copyButton('<?php echo 'crorepatibano.com/r?' . $user_id ?>', this.id)">Copy link <i class="fas fa-link"></i></button>
I’ve already enabled the necessary permissions in Kodular and ensured that JavaScript is enabled in the WebView.
I would greatly appreciate any insights, suggestions, or possible solutions to help me resolve this issue and enable the referral link to be copied successfully within the Kodular app’s WebView.
Thank you in advance for your assistance.