I observed that jQuery-Tags-Input was not working on Safari for iOS.
The following error is thrown:
TypeError: $('#phone').importTags is not a function. (In '$('#phone').importTags('')', '$('#phone').importTags' is undefined)
"phone" is the field when I'm applying them.
The code works flawlessly on Chrome and Firefox for iOS. Also, it works flawlessly on every desktop browser I've tried, including Safari (for Mac), Chrome, and Firefox. The problem was that safari for iOS with the ad block crystal is blocking the jquery.input.tags.js from loading.
Any idea why this is happening? I contacted the team of Crystal App.
function prepareTags() {
// Email, phone and tags
$('#phone').importTags(''); // ======> Code fails right here, just when initializing
$('#phone').tagsInput(updateMultiFieldForCustomer('phone'))
}
function updateMultiFieldForCustomer(fieldName) {
return {
width:'100%',
height:'auto',
defaultText:'add ' + fieldName,
onAddTag: function (tag) { multiFieldAddedTagAction(fieldName, tag) },
onRemoveTag: function (tag) { multiFieldRemovedTagAction(fieldName, tag) }
}
}
$(document).ready(function() {
customerid = $.urlParam("id")
customerAlias = $.urlParam("alias")
prepareTags()
}
Message from Web Inspector:
Content blocker prevented frame displaying https://app.thetask.ninja/customer.html?id=xxxxxxxxxxxx from loading a resource from https://app.thetask.ninja/js/plugins/tagsinput/jquery.tagsinput.min.js
I observed that jQuery-Tags-Input was not working on Safari for iOS. The following error is thrown:
"phone" is the field when I'm applying them.
The code works flawlessly on Chrome and Firefox for iOS. Also, it works flawlessly on every desktop browser I've tried, including Safari (for Mac), Chrome, and Firefox. The problem was that safari for iOS with the ad block crystal is blocking the jquery.input.tags.js from loading.
Any idea why this is happening? I contacted the team of Crystal App.
Html:
JS:
Message from Web Inspector:
Content blocker prevented frame displaying https://app.thetask.ninja/customer.html?id=xxxxxxxxxxxx from loading a resource from https://app.thetask.ninja/js/plugins/tagsinput/jquery.tagsinput.min.js
Steps to reproduce: