Skip to content

Change focus when input field was equal with maxlength #482

@rofifathurrohman

Description

@rofifathurrohman

i will make input automaticly change focus to next input if input field was equal with maxlength, the input field has been integrated with Mottie Keyboard, it's possible to do that?

Here's DEMO : JSFIDDLE

If no use Virtual Keyboard it's easy use this code:

$("input").bind("input", function() {
        var $this = $(this);
        setTimeout(function() {
            if ( $this.val().length >= parseInt($this.attr("maxlength"),10) )
                $this.next("input").focus();
        },0);
    });

when i combine script above with Mottie Keyboard, it's doesn't work.

Sorry for my bad english, Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions