fixed issue 771, moved the is newline param to opts and fixed the comment div vanish issue on enter