Refactor modal.html and fix scrollTop null issue