fixed dialog centering when vertical scrollbar appears or disappears