Click input to set the following code, input gets the focus and then gets the height again. 230 milliseconds later, the height is reassigned to achieve the effect of not blocking the input

      $('.sendBox input').on('click'.functionVar commentDom = document.querySelector('.sendBox input')
        setTimeout(function() {
          commentDom.scrollIntoView(true)
          commentDom.scrollIntoViewIfNeeded()
          document.body.scrollTop = document.body.scrollHeight
        }, 230)
      })
Copy the code