I was attacked whilst online today when I was attacking another player. The battle logs for my defense and attacks are within 20 seconds of each other. So, for me at least, being attacked while online is still happening...and yet another annoying bug that has not been fixed properly.