thedevdojo / chatter

Chatter is a Simple Laravel Forum Package
https://devdojo.com/forums
MIT License
898 stars 294 forks source link

Fix broken post/comment editing #200

Closed mattlibera closed 6 years ago

mattlibera commented 6 years ago

Addresses #129

Problem: Editing posts or comments results in an error: $.form is not defined. It appears that the addition of $.form that Chatter performs in chatter.js is not being processed in time to be used.

Fix: In chatter.js, I moved the declaration of $.form into the $('document').ready(function(){ block so that it would be loaded when the DOM loads, ensuring that jQuery is fully loaded and ready to go before this definition occurs.

I am not sure how this lines up with future goals for this package, but it can be considered a hotfix for now, if the eventual goal is to refactor away from the $.form method.

marktopper commented 6 years ago

Thanks