The last time I had Facebook was more than a year ago, so I don't know if anything has changed since.
But when I last had it, it used to be the same way (even though I was on my desktop computer, my phone always notified me of a new message).
I don't think your phone knows when you are using facebook on your desktop computer and automatically stop sending you notifications, its something you either have Enabled to On or Off.