JSFiddle - React, Tailwind, and code Playground

by nkovacs

HTML

<input type="text" />
<input type="text" />
<input type="text" />
<input type="text" />
<input type="text" />

CSS

input {
    width: 40px;
}

JavaScript

$('input').on('touchend', function() {
    var $this = $(this);
    $this.val('');
});

$('input').on('input', function() {
    var $this = $(this);
    //if ($this.data('keydowned')) {
        $this.data('keydowned', false);
    	$this.next('input').focus();
    //}
});

$('input').on('keydown', function() {
    var $this = $(this);
    $this.data('keydowned', true);
});