Answer the question
In order to leave comments, you need to log in
Why is the ios subscribe button not working?
I use the bitrix.subscribe.edit component. On a PC, the mailing list works correctly, but on the phone (in my case, iphone) the subscribe button does not work, initially it should be inactive, after clicking on the check box it becomes active, but when you click on the check box, nothing happens, and in the case if the button is already active, nothing happens when you click on it.
I tried to modernize the handler in the script by adding event handling, pressing the touchstart screen, It did not work out.
BX.ready(function(){
try {
var iOS = navigator.userAgent.match(/iPhone|iPad|iPod/i);
var event = "click";
if(iOS != null)
event = "touchstart";
if(document.getElementById('subscription_user_agreement'))
document.getElementById('subscription_user_agreement').addEventListener(event, function(){
var subscr_btn = document.getElementById('subscription_submit_btn');
if(subscr_btn.hasAttribute('disabled'))
{
subscr_btn.removeAttribute('disabled');
}
else
{
subscr_btn.setAttribute('disabled', 'disabled');
}
});
} catch(e) {}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question