Giter Site home page Giter Site logo

Comments (8)

jcesarmobile avatar jcesarmobile commented on April 29, 2024 1

I've been able to reproduce, so I'm going to reopen.
I've checked with just UIKeyboardIsLocalUserInfoKey and a combination of UIKeyboardIsLocalUserInfoKey and UIApplicationStateActive and they don't fix it and can even cause that the black area is not removed.

from capacitor-plugins.

Sasha4ever avatar Sasha4ever commented on April 29, 2024 1

Are there any news?

from capacitor-plugins.

benharpers avatar benharpers commented on April 29, 2024

Thanks for the update, not sure if it fixed the problem though. I copied just the Keyboard.m from the repo and seems to still happen. The if conditions you added aren't running while it's in the background, apparently the keyboard hide event from the other app like Messages happens after the Capacitor app becomes active, so UIApplicationStateActive is the state at that point.

I think this is the condition to check for:

  if (UIKeyboardIsLocalUserInfoKey.boolValue == true) {
...
  }

https://developer.apple.com/documentation/uikit/uiresponder/1621603-keyboardislocaluserinfokey

It appears to work, at least on my old iPhone X.

from capacitor-plugins.

jcesarmobile avatar jcesarmobile commented on April 29, 2024

I first tried with UIKeyboardIsLocalUserInfoKey and it was returning true sometimes, but my app wasn't showing a keyboard, so I don't think that value it's trustworthy. Checking for UIApplicationStateActive worked fine for me when switching from Twitter app, didn't try with Messages app, will try again.

from capacitor-plugins.

benharpers avatar benharpers commented on April 29, 2024

Yeah I did see the app state method work sometimes also, and I might have noticed some unreliability with the keyboardIsLocal option... perhaps it would be a good idea to check that both are true.

from capacitor-plugins.

benharpers avatar benharpers commented on April 29, 2024

I think part of the reason it's happening specifically with the swipe gesture on iPhone X is that the app activate and keyboard close event happen almost at the same time with that gesture, maybe either condition could happen first and maybe that is where the unreliability comes from.

from capacitor-plugins.

benharpers avatar benharpers commented on April 29, 2024

Thanks, sorry for the trouble! Not sure why Apple thought it was a good idea to let apps know about other apps keyboards!

from capacitor-plugins.

oliverandersencox avatar oliverandersencox commented on April 29, 2024

@jcesarmobile I have this issue when using the in app browser for social logins, the keyboard will appear and disappear ad the browser closes. However after the black space is left and does not resize.

Is there a method I can use to resize the app again after this?

from capacitor-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.