JSFiddle - React, Tailwind, and code Playground

HTML

<input>

JavaScript

$('input').keyup(function(e) {
    var e = $(this),
        val = e.val(),
        aPos = val.indexOf('a'),
        spl1 = val.substring(0, aPos+1),
        spl2 = val.substring(aPos, val.length).replace(/a/g, ''),
        v = spl1 + spl2;
    e.val(v);
});