Fix some problems in EditableElement