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

120
Views
Render component after keyboard closes or listen to keyboard close event in react app in cordova android

I am migrating a 'work-in-progress' react.js application to an android app using cordova. all seems to work fine except for a component that doesnt render itself peoperly when the keyboard closes, the component generally looks like this. enter image description here

Now when you click on an input and close it the view re renders just fine: enter image description here

But once you fill it and close the keyboard the component doesnt re render itself: enter image description here enter image description here

the component just gets stuck like that, the easy solution would obviously be to "force render" by setting the state again, the issue is that I cant seem to find a way to listen to keyboard changes on this react-cordova app, also why would the component re render itself when the form is empty but not when its filled?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Hope this helps someone: in the component: add an empty callback for the window resize event.

useEffect(() => {
        window.onresize = function(){
            //console.log("resizing");
        };
    }, []);

as well as adding to cordova config.xml: inside the widget tab xmlns:android="http://schemas.android.com/apk/res/android" as a property

and:

<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application/activity">
    <activity android:configChanges="orientation|keyboardHidden" android:windowSoftInputMode="adjustResize" />
    </edit-config>

as content of the widget.

also: <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, target-densityDpi=device-dpi" />

in the <head/> of public/index.html

about 4 years ago · Santiago Trujillo Report
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!