question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onremove won't fire for children elements

See original GitHub issue

Please see https://github.com/hyperapp/hyperapp/pull/467 with a failing test for this.

Basically when an element its removed only its onremove method seems to be called. None of the onremove lifecycle events are called for its children.

My specific use case is:

Modal Dialog Component |__ Camera custom component (oncreate calls getUserMedia and onremove closes the stream).

When I close the modal, the onremove method of my camera is not called.

Thanks for all your work!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jorgebucarancommented, Nov 29, 2017
0reactions
jorgebucarancommented, Dec 5, 2017

@4lejandrito I totally agree, this needs to be added to core. Not sure in what form exactly, but right now I am swaying in favor of your comment here: https://github.com/hyperapp/hyperapp/pull/470#issuecomment-349049424.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why mouseup event didn't fire for child element?
It seems like 'mouseup' event fires in draggable '.device' div then in it's parent '#devices' div then in it's parent '#main' div.
Read more >
Question about onremove · Issue #112 · jorgebucaran/hyperapp ...
I'm creating an Ace interop example for a presentation and not seeing the onremove fire when removing DOM elements.. I'm thinking I need...
Read more >
Element.Event - MooTools Core Documentation
This event fires when the mouse leaves the area of the DOM Element and will not be fired if the mouse crosses over...
Read more >
React Hooks - Understanding Component Re-renders - Medium
App component holds 'theme' variable in its state and has two Ticker Components as children. Theme is passed to the TickerComponents as props....
Read more >
AnimatePresence | Framer for Developers
Any motion components contained by the removed child that have an exit prop will fire that animation before the entire tree is finally...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found