Value from textInput connected to a collection, NOT getting saved in Safari ONLY. Working fine in Chrome and Firefox (Mac)

Hi All,
I have an Input text box which is connected to a collection. There is a button which is of type Submit and connected to same collection as input type. Collection has custom permission. Write and Update is for Any visitor to site, basically any visitor to the site can enter their email and click download button to download a file.

The whole process works absolutely fine in Chrome and Firefox on Mac. On Safari (v 12), it fails.


In order to see if this is Input Type Box connection problem to collection, I also tried to save the data via wix-code by connecting a function to onClick event of Submit button. Again this works fine in Firefox and Chrome (Mac), while fails in Safari. Weird issue.

This is the code I have which works fine on Firefox/Chrome(Mac) while fails in Safari:
// For full API documentation, including code examples, visit Velo API Reference - Wix.com
import wixData from ‘wix-data’;

$w.onReady( function () {
//TODO: write your page related code here…
$w(“#button1”).disable();

// $w(“#input1”).onChange( (event, $w) => {
// let newValue = event.target.value; // “new value”
// });

$w(“#input1”).onKeyPress( (event) => {
let key = event.key; // “a”
console.log(“value is changing”)
$w(“#input1”).onCustomValidation((value, reject) => {
// console.log(value)
if (!validateEmail(value)) {
$w(“#button1”).disable();
reject(“Please enter a valid email address”);
} else {
$w(“#button1”).enable();
}
});
});

});

function validateEmail(email) {
var re = /^(([^<>()\.,;:\s@"]+(.[^<>()\.,;:\s@"]+)*)|(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}

export function downloadButtonCliked(event) {
//Add your code for this event here:
var emailEntered = $w(“#input1”).value;
let object = {
email : emailEntered
};
let options = {
“suppressAuth”: true ,
};
wixData.insert(“emails_of_people_who_downloaded_app”, object,options).then( (results) => {
console.log("#### success saved #### " + results)
} )
. catch ( (err) => {
console.log("Error While Saving ##### " + err)
} );
console.log("data saved " + emailEntered);
}


Error I see in Javascript console on Safari is below:

[Error] save operation failed:
Error
n
onreadystatechange
o — wixcode-worker.js:17:84362
(anonymous function) (wixcode-worker.js:17:110985)
(anonymous function) (wixcode-worker.js:17:111879)
(anonymous function)
error (app.js:1:231573)
(anonymous function) (app.js:6:106121)
w (wixcode-worker.js:1:64665)
(anonymous function) (wixcode-worker.js:1:64450)
n (app.js:6:105505)
(anonymous function) (app.js:6:105625)
a (wixcode-worker.js:17:52073)
(anonymous function) (wixcode-worker.js:17:52218)
c (wixcode-worker.js:1:38658)
promiseReactionJob
[Error] Fetch API cannot load https://sentry.io/api/286440/store/?sentry_version=7&sentry_client=raven-js%2F3.27.0&sentry_key=b58591105c1c42be95f1e7a3d5b3755e due to access control checks.
[Error] Failed to load resource (store, line 0)
[Error] Fetch API cannot load https://frog.wix.com/trg?src=79&ver=unknown&app_name=dbsm-viewer-app&app_id=dataBinding&evid=10&dsc=&errn=&errc=1&_=15511675086411&ms=12357 due to access control checks.
[Error] Failed to load resource (trg, line 0)
[Error] Publisher ‘’ failed with error: ‘Type error’ – TypeError: Type error
TypeError: Type error
(anonymous function) (wixcode-worker.js:17:110985)
(anonymous function) (wixcode-worker.js:17:111879)
(anonymous function)
error (app.js:1:231573)
error (app.js:6:9728)
value (app.js:1:107417)
a (wixcode-worker.js:17:52073)
(anonymous function) (wixcode-worker.js:17:52218)
c (wixcode-worker.js:1:38658)
promiseReactionJob


I see “due to access control checks.” in error logs. I re-checked the permissions and its fine for anyone to be able to submit. Also it works fine and data gets saved in collection on Firefox and Chrome.

Can someone please help me and guide me what could potentially be a problem?

Your help will be much appreciated.

Thanks