Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: WKWebView is not resized properly after the native Share modal has been closed #831

Open
ChristopherTotty opened this issue Feb 22, 2022 · 3 comments

Comments

@ChristopherTotty
Copy link

Bug Report

Plugin(s)

capacitor/share v1.1.0

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 3.4.1
  @capacitor/core: 3.4.1
  @capacitor/android: 3.4.1
  @capacitor/ios: 3.4.1

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/core: 3.4.1
  @capacitor/cli: 3.4.1
  @capacitor/ios: 3.4.1

[success] iOS looking great! 👌

Platform(s)

iOS, confirmed on hardware iPhone XR and iPhone 12 Pro. iOS Simulator does not replicate.

Current Behavior

Using the Share sheet functionality, then calling for a share to the Messages app causes the app view to resize. After completing or cancelling the share, the app view does not return to its original size/origin.

Expected Behavior

After completing or cancelling the share, the app view should return to its original size/origin.

Code Reproduction

https://github.com/ChristopherTotty/capacitor-share-replication

Other Technical Details

Unsure on replication as the device will sometimes work but then after a power cycle the issue will present again.

Additional Context

See:
ionic-team/capacitor#2979
ionic-team/capacitor#2955

RPReplay_Final1645561625.mov
@jcesarmobile
Copy link
Member

Adding another repository that proves that the issue is on keyboard plugin instead of share plugin
https://github.com/nprather/toolbar-dissappearing.git

workarounds are to uninstall @capacitor/keyboard until the bug is fixed or configure the resize mode to anything other than native. i.e

"plugins": {
    "Keyboard": {
        "resize": "ionic"
    }
}

@drakedeatonuk
Copy link

drakedeatonuk commented Sep 18, 2024

I've noticed similar issues the webview not resizing, but related to the keyboard closing.

@ChristopherTotty I've opened a similar ticket here: #2194

@dabaaaz
Copy link

dabaaaz commented Dec 10, 2024

Do you know if Keyboard with Share will be OK soon ?

"resize": "ionic" is not working for me :/

Thanks to @ChristopherTotty : https://github.com/ionic-team/capacitor-plugins/pull/832/files
I've added the fix for frame.size.width & frame.origin.x too :) !

self?.bridge?.webView?.frame.size.height = UIScreen.main.bounds.size.height
self?.bridge?.webView?.frame.size.width = UIScreen.main.bounds.size.width
self?.bridge?.webView?.frame.origin.y = 0
self?.bridge?.webView?.frame.origin.x = 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants