ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.09k stars 13.51k forks source link

NavPop wrong after use IonicPage on ios #13965

Closed sin-bufan closed 5 years ago

sin-bufan commented 6 years ago

Ionic version: (check one with "x") (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) [ ] 2.x [x] 3.8.0 [] 4.x

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request

Current behavior: after use IonicPage, if enter the page which contains iframe, then use NavPop to go back, the NavController will get wrong. this only appear after add IonicPage to these pages contains iframe, only appear on WKWebview of ios, UIWebview and android works fine. this only appear at prod build on ios, debug build works fine.

Expected behavior: i need to use both IonicPage and iframe. please consider to fix the bug or tell me a walkaround.

Steps to reproduce: 1 start a blank ionic project. it has a home page. 2 generate page-1 and page-2 3 add IonicPage and IonicPageModule to these 3 pages(home, page-1 page-2) 4 at home, insert a button to push page-1, at page-1, insert a button to push page-2 5 at page-2, insert a iframe(link to any url like google). 6 build a prod build and run it on a ios device 7 at home page, tap button enter page-1,then enter page-2, tap back button, it will go back to page-1, until this moment everything works fine, then tap back button on page-1, you will see the bug happen.

Related code:

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):


cli packages: (D:\npm\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.8.0

System:

    Android SDK Tools : 25.2.2
    Node              : v8.0.0
    npm               : 3.8.6
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : D:\_AndroidSDK

Misc:

    backend : legacy
matejuh commented 6 years ago

Looks like the same issue like mine with : https://github.com/ionic-team/ionic/issues/13956 Probably WKWebview handles incorrectly remote objects size. It also happens which you have clickable object in the - the event position is invalid.

BPMASSTEAM commented 6 years ago

Please remove my id from this thread. I never signed up for this.

Thanks.

Best Regards,

Swati Vaidya Portal and Mobile, Development Lead BP Business Service Centre Asia Sdn Bhd (876587-W) Level 9, Tower 5, Avenue 7, The Horizon Bangsar South City No. 8, Jalan Kerinchi 59200 Kuala Lumpur

Direct +603 2281 8227 Mobile +6019 257 9965 swati.vaidya@se1.bp.commailto:paul.choo@se1.bp.com

Email disclaimer: The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee(s) only. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or an action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Within the bounds of law, electronic transmissions through internal and external networks may be monitored to ensure compliance with internal policies and legitimate business purposes.

On 11 Feb 2018, at 11:29 PM, matejuh notifications@github.com<mailto:notifications@github.com> wrote:

Looks like the same issue like mine with : #13956https://github.com/ionic-team/ionic/issues/13956 Probably WKWebview handles incorrectly remote objects size. It also happens which you have clickable object in the - the event position is invalid.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ionic-team/ionic/issues/13965#issuecomment-364759848, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Agr25rDnk7hmcBxmhgcQjiBNGfsyxR8bks5tTwdFgaJpZM4R67iW.

sin-bufan commented 6 years ago

it's because of WKWebview for sure, if i use UIWebview, the problem gone! so the keyword is WKWebview, navigation stack and iframe.

ionitron-bot[bot] commented 5 years ago

This issue has been automatically identified as an Ionic 3 issue. We recently moved Ionic 3 to its own repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

If I've made a mistake, and if this issue is still relevant to Ionic 4, please let the Ionic Framework team know!

Thank you for using Ionic!