Adaptation of the interface when the on-screen keyboard is switched on

When you activate the inputtextarea, the height changes, so that certain elements are no longer available, and others overlap. I’m using react js, is there any way to adapt the interface when the keyboard is enabled?

I tried to solve the problem myself via useRef, but I encountered two problems

  1. After closing the keyboard, the inputtextarea was still active and the elements were inactive
  2. Scrolling to the desired element did not work correctly and I had to make several clicks, not automatically