Skip to Content
Menu
This question has been flagged
1456 Views

I want to autofocus the cursor to field2 when the value entered in field1

Ex : while open the form the cursor is on field 1, when i entered the value in field1 the cursor want to move to field2 automatically


odoo.define('js_demo.stock_exchange', function(require) {"use strict";

var Widget = require('web.Widget');
var onchange = Widget.extend({
        start: function () {
            var self = this;
            console.log("wrfffff")
            return this._super.apply(arguments).then($('barcode').on('change',function() {
                $('qty').focus()  
                console.log("onchangeeee")
            }));
        },
    });
return onchange;
});

Please provide any solution and would be greatly appreciated for your answer. Thank you

Avatar
Discard
Related Posts Replies Views Activity
2
Dec 24
3116
1
Dec 24
343
4
Nov 24
1362
1
Sep 24
1132
1
Sep 24
1198