Shanghai might be considered a safe city to visit at all times, you will see "gong ann" everywhere wither patrolling or stationed.
However, been a frequent traveller to Shanghai, I would recommand you to be more careful when you are around "pu xing jie".
There are still syndicated group of people around especially looking for foreigners.
I was walking on the street once and bought something along the street, after receiving the change of RMB 5 in hand and before I am able to stuff it into my pocket, a little girl (age around 5 years old) came and snatch it away.
I saw her running towards 2 adults seated at the side and passing the $$ to them. I just stare in disbelief!! After that she came running towards my direction againm saying "ge ge bu gou hai you ma?" My friend (from Shanghai) shouted at her and she just ran off.
My friend said these people are mostly from Xinjiang, they would hunt for tourist pickpocket them or snatch their valuables. She recommended me to report to the "gong ann" but I just wanna save all the trouble.
Just beware and be alert and you will be fine!!
Cheers and have a nice trip.