0
I have this div in my Html, when clicked, opens the file explorer, through the Plupload, to upload a pdf:
<div @(Convert.ToInt32(documento.CodDocumento) > 0 ? "style=display:none" : "") class="ui compact icon button green btn-enviar-arquivos btn-doc-obrigatorio" id="[email protected]" onclick="void(0);" tabindex="0" title="Anexar">
<i class="upload icon"></i>
</div>
The class btn-enviar-arquivos
is used by Plupload as the listener to open the exploited OS files. And the class btn-doc-obrigatorio
is used as a click listener to perform some actions:
$(document).on('click', '.btn-doc-obrigatorio', function (e) {
e.preventDefault();
var tipo = $(this).closest('tr').find('td[data-tipo]').text();
$('#hdnCodTipoDoc').val(tipo);
$('#hdnTipoDocObrigatorio').val(1);
});
All of this works perfectly on all browsers, including Safari. However, the class event listener btn-doc-obrigatorio
is not fired in Safari in mobile version. What may be happening for it not to be shot only in this environment?
Because the div has this
onclick="void(0);"
? You’ve tested without it?– Sam
I already tested yes. I used it for the fact that several places advise to put this
onclick="void(0)"
on account of Safari mobile– João Vitor Lumertz