I noticed that when I'm trying to comment too fast in a page it's getting reloaded. I want to avoid reloading the whole page just because someone submits comments too quickly but I don't know where to start.
BTW, here's the ajax script I'm using. Since I'm really new on ajax and jQuery, I haven't been able to figure how to avoid the said issue, or if the said issue is in my ajax script. I'm also using underscores theme if that info would be relevant.
EDIT: I did some trial and error and noticed stuffs, changing the title for a more accurate description as well.
- The reload problem don't happen when posting comments in rapid succession.
- Submitting a comment for the first time reloads all contents under #comment element, and the reloading issue is starting when using the form inside the reloaded #comment element, e.g. when trying to comment on a second time.