Fixing the controls' position only when they are visible.