qcl / QCLean

QCLean - Remove Facebook Ads, Suggested Pages & Posts
http://qcl.github.io/QCLean/
MIT License
79 stars 16 forks source link

Fix the like, comment function when click-to-open show the post #23

Closed mark86092 closed 8 years ago

mark86092 commented 8 years ago

Issue detail description: When the clickToOpenDiv is clicked, it shows the hiddens. However, the hiddens can not do like, comment action. The event handler (eg: send like POST) listen to the action icon is disappeared.

Why:

target.firstChild.innerHTML = html + target.firstChild.innerHTML;

This code will recreate the inner DOM, thus lose all of the binding events

Fix: Prepend the desire DOM to the target.firstChild

qcl commented 8 years ago

Thanks @mark86092 for finding this issue and providing this solution! 👍

mark86092 commented 8 years ago

It's my honor :smile: