Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set-html! and event listeners #59

Closed
taylorSando opened this issue Jun 14, 2013 · 1 comment
Closed

set-html! and event listeners #59

taylorSando opened this issue Jun 14, 2013 · 1 comment

Comments

@taylorSando
Copy link

I think you should take out the line of https://github.com/levand/domina/blob/master/src/cljs/domina.cljs#L385

I think you should leave the events as they are, because let us say you had the following:

<div id="top-div">
<!-- child content -->
</div>

If you have an event listener on #top-div and you call set-html! on #top-div, those event listeners are wiped out. It seems like this doesn't need to be the case, because it's just the inner html that is getting changed, not #top-div.

@xavi
Copy link

xavi commented Sep 22, 2013

Just wanted to say that I've been bitten by the same problem. (Sorry, no time to contribute a Pull Request now, I'll just set the innerHTML property directly to work around it.)

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

No branches or pull requests

3 participants