Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Popup("destroy") never ends #5244

Closed
DzenisevichK opened this issue Nov 2, 2012 · 2 comments
Closed

Popup("destroy") never ends #5244

DzenisevichK opened this issue Nov 2, 2012 · 2 comments

Comments

@DzenisevichK
Copy link

Test case:

http://jsbin.com/epowaq/7

Steps:

  • Click on "Open Popup"
  • Close popup - you will entered in "popup._destroy -> container.remove -> cleanData -> popup._destroy" loop that never ends.

Final results on different platforms:

  • ~1 min hung and then stack execution timeout on
    • (mobile Safari on iOS 4.3.3),
    • (mobile Safari on iOS 6),
  • ~3 sec hung on
    • (Chrome 22.0.1229.94 m on Windows 7 SP1 x64)
    • (IE9 on Windows 7 SP1 x64)
    • (Safari 5.1.7 on Windows 7 SP1 x64)

Related issue #5150

@gabrielschulhof
Copy link

Good catch! If the payload element is not initially attached to the DOM, there's no place to put it back, so it stays inside the container. I shall have to detach() it and then remove the container.

@DzenisevichK
Copy link
Author

@gabrielschulhof

Great! Thanks a lot!

gabrielschulhof pushed a commit that referenced this issue Nov 2, 2012
…container before attempting to put it back to its original place in the DOM (which may not exist, if the popup was created based on a detached element) -- Fixes #5244

Conflicts:

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

No branches or pull requests

2 participants