katzer / cordova-plugin-email-composer

Edit and send email messages
Apache License 2.0
345 stars 336 forks source link

iOS 13 issue after sending email: return to my app and the screen is "magnified". #343

Closed jondspa closed 2 years ago

jondspa commented 4 years ago

Hi -

Thanks for the great plugin! It's been working great for a long time.

Unfortunately with iOS 13, on certain phones, there's a big issue. When I run this plugin on an iPhone with a notch (e,g., iPhone X or iPhone 11), after invoking the plugin and sending an email, I return to my app and the screen is "magnified." That is, the content is pushed up, down, left, and right. When I run this on an iPhone 5s, it's all fine.

I don't know if this helps but I noticed that the screen dimensions have changed. When I ask jQuery before invoking the plugin my iPhone X dimensions:

$(window).height() = 768 $(window).width() = 375

after sending an email and returning to my app:

$(window).height() = 840 $(window).width() = 410

This only occurs on iOS13, iOS12 is fine.

Tested on the latest versions of Cordova - 9.0.0 Cordova and cordova-ios 5.0.1.

Thanks much!

jondspa commented 4 years ago

I've managed to find a workaround/solution. I got a hint of a workaround from a problem reported with the camera plugin and iOS 13: github.com/apache/cordova-plugin-statusbar/issues/156. In the callaback for your plugin, I do:

 StatusBar.hide();
 StatusBar.show();

Now it works great on all iOS 13 devices!

Thanks,

jfoclpf commented 2 years ago

Thanks a lot for sharing @jondspa