Disable autocomplete for keyup on jQuery

There’s an event I cannot handle on jQuery: the Firefox autocomplete on textarea.

If you have to use the keyup event for a string match on textarea content, you have to exclude autocompletion, that is out of keyup logic.

To do this, simply add:

$(‘#myelement’).attr(‘autocomplete’, ‘off’);

to your jQuery. Autocomplete will be disabled and the unhandled event will not fire.

See also:

One response to “Disable autocomplete for keyup on jQuery”

%d bloggers like this: