Breakups happen and reactions follow. This is why is always best to take time out to think about the right time to move on. See How to know if it is a rebound or a real relationship?:
1. Timing: After a breakup, the time to heal is necessary. For some, denial is their reaction and they end up forcing a new relationship to overcome the recent heartbreak. That is a rebound.
2. You still love him or her: If you keep thinking about your ex and comparing your present partner to him or her, it is obviously a rebound that will not last.
3. Stalking your ex: You do not need a new relationship, you actually need help.