Just put some more javascript in there to deal with it. I'm sure it's not the hardest problem in the world.
It's also still visible if someone is using noscript (actually, I have no idea if Facebook works with noscript, probably not).
The solution you are suggestion doesn't solve the problem and injects more corner cases.