I have added a button on my page. The code associated with it increments two fields in my database.
The button works fine in Safari and iPad. But on iPhone, the button will not increment the field. I’ll click it, it will darken, but freeze at that point.
I am using the latest public beta of iOS 14 on both the iPad and iPhone. I would expect them to act the same, but they don’t.
Do you have any knowledge of buttons not working well in iOS 14?
Thanks!
Here’s the code that runs when I click the button.
export function iconButton1_click(event, $w) {
//console.log($w(“#entriesread”).getCurrentItem());
let items = $w( “#entriesread” ).getCurrentItem()
//console.log(items)
let numhelps = items.numhelpfuls2
let numhelpsint = items.numhelpfulsint
//console.log(numhelps)
//console.log(numhelpsint)
$w( "#entriesread" ).onReady(() => {
$w( "#entriesread" ).setFieldValue( "numhelpfuls2" , String(parseFloat(numhelps)+ 1.0 ))
$w( "#entriesread" ).setFieldValue( "numhelpfulsint" , numhelpsint + 1 )
$w( "#entriesread" ).setSort(wixData.sort()
.descending( "numhelpfulsint" )
);
});
}