Fix bug of DOM resizing event trigger