Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
Window resize event is not triggered on closing the keypad or Bottom address bar in ios browsers and PWA

I am trying to make my app occupy the entire height of the browser using resize event.

Here is the sample code:

import React from 'react'
import { observer } from 'mobx-react'
import { observable } from 'mobx'

import { AppWrapper } from './styledComponents'

@observer
class App extends React.Component {
 @observable availableHeight: number = window.innerHeight

 componentDidMount() {
    window.addEventListener('resize', this.handleResize)
 }

 componentWillUnMount() {
    window.removeEventListener('resize', this.handleResize)
 }

 handleResize = () => {
    this.availableHeight = window.innerHeight
 }

 render() {
    return (
       <AppWrapper height={this.availableHeight}>
          ...
       </AppWrapper>
    )
 }
}

export default App
export const AppWrapper = styled.div`
${tw`min-h-full`}
   height: ${({ height }) => height}px;
`

It's working as expected on Android devices, but I started facing issues in the ios browsers.

When Keypad is open, I am getting some white space at the bottom of App and it persists even when the keypad is closed.

Same with the Bottom Address bar also, the resize event is not even triggered in such cases.

This issue is persisting in the PWA also.

Is there any way to avoid these height-related issues in ios?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda