Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

116
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!