prevent the virtual keyboard from opening

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
mcvaidas
Posts: 26
Joined: 2019-04-14 17:45

prevent the virtual keyboard from opening

Post by mcvaidas » 2022-06-18 02:14

Hello. is any way to prevent
the virtual keyboard from opening in mobile browser? i made POS system and like to use with tauchscreen. all lookup fields opening my virtual keyboard

mcvaidas
Posts: 26
Joined: 2019-04-14 17:45

Re: prevent the virtual keyboard from opening

Post by mcvaidas » 2022-06-23 05:25

This code works on dropdowns from options list, but not for lookup.

/* Hide keyboard on select2 open event */
function hideSelect2Keyboard(e){
$j('.select2-search input, :focus,input').prop('focus',false).blur();
console.log('closing keyboard');
}

$j("select").select2().on("select2-open", hideSelect2Keyboard);

$j("select").select2().on("select2-close",function(){
setTimeout(hideSelect2Keyboard, 500);
});

mcvaidas
Posts: 26
Joined: 2019-04-14 17:45

Re: prevent the virtual keyboard from opening

Post by mcvaidas » 2022-07-01 15:18

No ideas?

mcvaidas
Posts: 26
Joined: 2019-04-14 17:45

Re: prevent the virtual keyboard from opening

Post by mcvaidas » 2022-07-01 19:13

It works!!!


$j('#table_nr-container').on('select2-open', function (e)
{
console.log('table_nr');
$j('.select2-search input, :focus,input').prop('focus',false).blur();
});

$j('#group-container').on('select2-open', function (e)
{
console.log('group');
$j('.select2-search input, :focus,input').prop('focus',false).blur();
});

$j('#item-container').on('select2-open', function (e)
{
console.log('item');
$j('.select2-search input, :focus,input').prop('focus',false).blur();
});

$j('select').on('select2-open', function (e)
{
console.log('amount');
$j('.select2-search input, :focus,input').prop('focus',false).blur();
});

Post Reply