A
A
andruschenko0332019-07-29 16:35:33
JavaScript
andruschenko033, 2019-07-29 16:35:33

Why does the dropdown menu in mobile close when opening the keyboard on android?

There is a site on Bitrix https://dverlend.ru . In the mobile version, the search bar is in the drop-down menu. when i want to type something in the search, the android keyboard opens and at that moment the menu closes, so i don't see the input field in the search. What could be the reason? and how can it be corrected? Tell me please

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tyzberd, 2019-07-29
@andruschenko033

in /local/templates/dverlend/assets/js/touch-sideswipe.js there is a code that works on resize. And opening the keyboard causes a resize

function tssRecalcStates() {
            if (open === true) {
                tssClose();
            }
            winInnerWidth = window.innerWidth;
           /*  if (winInnerWidth > 499) {
                elSubmainWidth = opt.elSubmainWidth;
            } else {
                elSubmainWidth = winInnerWidth * opt.elSubmainMaxWidth;
            } */

            elMainWidth = elSubmainWidth + opt.sideHookWidth;
            elSubmainWidth = elMainWidth - 15;
            elSubmain.style.width = opt.menuWidth + 'px';
            elMain.style.transform = 'translateX(' + (-elSubmainWidth) + 'px)';
            elMain.style.width = elMainWidth + 'px';
        }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question