Skip to content
This repository has been archived by the owner on Aug 5, 2019. It is now read-only.

DatePicker leaks DOM Objects #500

Open
twistedpair opened this issue May 12, 2014 · 4 comments
Open

DatePicker leaks DOM Objects #500

twistedpair opened this issue May 12, 2014 · 4 comments

Comments

@twistedpair
Copy link
Contributor

To reproduce:

Visit: http://gwtbootstrap.github.io/#component:datepicker

In Chrome, open Dev Tools and run document.getElementsByClassName('datepicker').length

You should get 10

Now jump back and forth between the following two links about four times:
http://gwtbootstrap.github.io/#gwt:
http://gwtbootstrap.github.io/#component:datepicker

On the console again run document.getElementsByClassName('datepicker').length

You should get about 81

Because the DatePicker JS is blithely injecting more datepicker divs into the page, they just keep racking up. It's worth noting that these are being added directly to the root node of the page, rather than into the content frames that GWT normally uses.

I'd hope we could cleanly destroy these on transition to another presenter, but am not sure if that's the role of the component or the JS lib. Let me know what you think.

@reinert
Copy link
Contributor

reinert commented May 12, 2014

@twistedpair I was aware of this over configuration.

Indeed I've provided a fix for that (https://github.com/reinert/gwt-bootstrap/commit/849256002a498b3da3f7a1c7dee5d569d49bfaa2) as reported at #496.

Showcase is not updated.

If you're experiencing this leak in your own projects, I would appreciate a feedback.

@reinert reinert closed this as completed May 12, 2014
@reinert reinert reopened this May 12, 2014
@reinert
Copy link
Contributor

reinert commented May 12, 2014

(closed unintentionally)

@twistedpair
Copy link
Contributor Author

@reinert Thanks. I do see the problem in my project and will check after the next release to see if the problem persists.

@reinert
Copy link
Contributor

reinert commented May 20, 2014

Soon we'll release a version with this fix.

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

No branches or pull requests

2 participants