make autoresizing of documentation demo blocks more robust