GitToTheHub commented on issue #1649:
URL: https://github.com/apache/cordova-ios/issues/1649#issuecomment-4452602402

   I asked ChatGPT and this would be the way to natively determine a keyboard 
show/hide:
   
   ```js
   window.visualViewport.addEventListener("resize", () => {
       const viewportHeight = window.visualViewport.height;
       const fullHeight = window.innerHeight;
   
       // Keyboard likely visible
       if (viewportHeight < fullHeight * 0.75) {
           console.log("Keyboard shown");
       } else {
           console.log("Keyboard hidden");
       }
   });
   ```
   
   This would use the [VisualViewport 
API](https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport). Maybe 
it's possible to not use a plugin for this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to