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

Class attribute not cleared when re-using elements from cache pool #97

Closed
steelbrain opened this issue Mar 17, 2016 · 6 comments
Closed
Assignees
Labels
Milestone

Comments

@steelbrain
Copy link

I am hitting a very weird and difficult to reproduce bug. It would be nice to have a Slack, Gitter or IRC channel for preact where I can collaborate with the community to repro it.

The bug I'm hitting is with Message Component of linter-ui-default.
It should, according to the code produce messages like this, and it does

screen shot 2016-03-16 at 7 22 46 pm

but after a few dozen render triggers, it becomes this

screen shot 2016-03-16 at 7 22 34 pm

Nothing on our component side changes, I believe the bug to be on preact's side

Update

After an hour trying to repro, I found out that it's using the span elements from linter-eslint that it had recycled, and it's passing the same without clearing their class attribute

@developit
Copy link
Member

Hi @steelbrain - there is a gitter room, gitter.im/developit/preact

I suspect this may be related to the manual Element insertion via appendChild - this ends up getting recollected by preact's recycled, but it does not have any props associated because it was not created by preact. I can look into supporting that though, otherwise preact really shouldn't be recollecting an Element it didn't create.

@steelbrain
Copy link
Author

Please note that the examples demonstrated don't use appendChild, its support exists but it isn't used

@developit developit added this to the 4.4 milestone Mar 18, 2016
@developit developit self-assigned this Mar 18, 2016
@developit developit added the bug label Mar 18, 2016
@developit
Copy link
Member

Fix released in 4.4.

@steelbrain
Copy link
Author

Beautiful, thanks again! 👍

@StoneCypher
Copy link

@developit - gitter.im/developit/preact doesn't seem to exist. is there a replacement?

@StoneCypher
Copy link

nevermind, found it

the new chat is at preact.slack.com

you must sign up from https://preact-slack.now.sh instead

marvinhagemeister pushed a commit that referenced this issue Mar 2, 2019
Add full support for custom element event names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants