You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Cursor is jumping at the last of form field when text is typed in between.

edited Dec 12, 2019 6:09AM in Visual Builder

Summary

Using oj-input-text , cusror is jumping at the last on typing any character in between the form field.

Content

Using oj-input-text , cursor is jumping at the last on typing any character in between the form field.

Same thing is working when given <input> instead of <oj-input-text>

I have used the below code JS where 'firstName' is the id for firstname form field.

$("#firstName").on('input', function(){

    // store current positions in variables
    var start = this.selectionStart,
        end = this.selectionEnd;

    this.value = this.value.toLowerCase();

    // restore from variables...
    this.setSelectionRange(start, end);
});

But it is showing setSelectionRange() is not a function on using <oj-input-text>

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!