The problem with displaying the site on the phone

  Kiến thức lập trình

There is a website written in angular 2. When integrating it on a mobile device, when interacting with input=text, a keyboard appears that breaks the layout, everything shifts up. how can this be fixed?
I want to clarify, there is no way to interact with the mobile application itself and use only angular features
Of course, I tried to find answers on this forum, but it didn’t help me in particular:

setTimeout(function () {
        let viewheight = $(window).height();
        let viewwidth = $(window).width();
        let viewport = document.querySelector("meta[name=viewport]");
        viewport.setAttribute("content", "height=" + viewheight + "px, width=" + viewwidth + "px,       initial-scale=1.0");
    }, 300);

New contributor

maloy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT