EddyVerbruggen / SocialSharing-PhoneGap-Plugin

👨‍❤️‍💋‍👨 Cordova plugin to share text, a file (image/PDF/..), or a URL (or all three) via the native sharing widget
MIT License
1.78k stars 907 forks source link

iOS status bar covers webview when returning from sharing #788

Open blupu opened 7 years ago

blupu commented 7 years ago

Just to let you know that I have encountered an annoying bug lately.

Since I've upgraded to version 2.2.1 of StatusBar, the iOS status bar overlays the webview when returning from the sharing app (eg. mail app).

Workaround: downgrading to 2.2.0 resolves the problem.

I have opened an issue on the Apache Cordova issue tracker: https://issues.apache.org/jira/browse/CB-12507?filter=-2

JimmyBillan commented 6 years ago

I got the same issue when the a sharing screen cover the status bar. Have you post this issue on the status-bar plugin?

Unkn0wn0x commented 5 years ago

I fixed this issue by using the status-bar plugin and calling this.statusbar.hide() before calling the sharing plugin and after finished the sharing, calling this.statusbar.show().

Hope it helps someone.

--- EDIT ---

Event better solution, you can call the following code, in your thenand catch functions (if you use Ionic and have the platform module installed, for detecting iOS devices:

this.myFunction().then(() => {

    /** iOS fix to prevent stretched webview */
    if (this.platform.is('ios')) this.statusBar.hide(); this.statusBar.show();

    /** do something else */
    return;

}).catch(() => {

    /** iOS fix to prevent stretched webview */
    if (this.platform.is('ios')) this.statusBar.hide(); this.statusBar.show();

    /** do something else */
    return;
});