Event.isTrusted and simulate mouse click

Event.isTrusted не работает в ИЕ используем (!arguments[0].screenY && !arguments[0].screenX) для симуляции клика $(this).closest(‘a’)[0].click()

The HTMLElement.click() method simulates a mouse click on an element.

The isTrusted read-only property of the Event interface is a boolean value that is true when the event was generated by a user action, and false when the event was created or modified by a script or dispatched via EventTarget.dispatchEvent().

    <a onclick="if(!arguments[0].isTrusted || (!arguments[0].screenY && !arguments[0].screenX)) return true; $(this).find('select').removeClass('hidden'); return false;" href="/performedworks/report1/allscan/zzz" class="btn btn-primary pull-right" title="Архив скан-копий реестров (zip) за год" target="_blank" style="padding: 3px;">
        <i style="font-size: 26px; width: 40px;" class="far fa-file-archive"></i>
        <select class="form-control hidden" onchange="$(this).addClass('hidden'); var val = $(this).val(); var href = $(this).closest('a').attr('href', function(){ return $(this).attr('href').replace(/\/[^\/]+$/, '/' + val); }); $(this).closest('a')[0].click();">
            <option value="" disabled selected></option>
            <?php
            $y = date('Y');
            $i = -1;
            while(++$i < 7) { ?>
            <option value="<?= $y - $i ?>"><?= $y - $i ?></option>
            <?php } ?>
        </select>
    </a>
    <div class="clearfix"></div>