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
51k stars 13.52k forks source link

Android RippleActivator causing Detached DOM nodes #10459

Closed ivanmayes closed 7 years ago

ivanmayes commented 7 years ago

Ionic version: (check one with "x") [ ] 1.x [x] 2.x

I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior: When using the android version of serve, clicking through an app with click events leaves Detached DOM Nodes for all of the elements that RippleActivator should be listening to. Just navigating between pages is enough to recreate the issue usually, but clicking on some of these elements creates it. screen shot 2017-02-15 at 5 07 35 pm

Can confirm with our app that running ?ionicplatform=ios removed the detached nodes. It's possible *ngIf exacerbates the problem. These nodes are building up in our app that is a kiosk and making it impossible for us to deploy our ionic 2 app. We tried:

IonicModule.forRoot(AppComponent, {
            swipeBackEnabled: false,
            pageTransition: projectConfig.pageTransition,
            platforms: {
                android: {
                    activator: 'highlight'
                }
            }
        }

But that did not seem to change RippleActivator from attaching events. At this point, finding a way to disable the activator would work in the interim as the leak is fixed.

Expected behavior: Navigating between pages should correctly remove listeners from elements to avoid detached DOM nodes.

jgw96 commented 7 years ago

Thanks for using Ionic, we will look into this.

ivanmayes commented 7 years ago

Thanks @jgw96. Due to timing for launching our app, is there a known way that should disable RippleActivator from attaching listeners? We weren't able to get that to happen using activator: 'highlight' or 'none'. In the meantime, we've resorted to removing the functionality from the ionic src before building, which obviously isn't a great long term strategy!

manucorporat commented 7 years ago

There is a commit pending for approval that fixes a lot of memory leaks, including this one!

ionitron-bot[bot] commented 6 years ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.