We use top only when body is set to position fix. Setting it after modal close to auto (default value) lets browser decide about positions with is what we want in this situation.