add event when press enter, fix a multiline tab bug