fix the diallog displaying bug inin firefox