diff --git a/xml/impl/src/com/intellij/codeInsight/completion/XmlTagInsertHandler.java b/xml/impl/src/com/intellij/codeInsight/completion/XmlTagInsertHandler.java index 15968704f92f..089f746fcb55 100644 --- a/xml/impl/src/com/intellij/codeInsight/completion/XmlTagInsertHandler.java +++ b/xml/impl/src/com/intellij/codeInsight/completion/XmlTagInsertHandler.java @@ -260,7 +260,7 @@ public class XmlTagInsertHandler implements InsertHandler { if (toInsertCDataEnd) template.addTextSegment("\n]]>"); - if ((!(tag instanceof HtmlTag) || !HtmlUtil.isSingleHtmlTag(tag, true)) && tag.getAttributes().length == 0) { + if ((!(tag instanceof HtmlTag) || !HtmlUtil.isSingleHtmlTag(tag, true)) && indirectRequiredAttrs == null) { if (WebEditorOptions.getInstance().isAutomaticallyInsertClosingTag()) { final String name = descriptor.getName(tag); if (name != null) {