Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363034

Summary: [editor] xhtml end-tag gets deleted when typing an attribute
Product: [WebTools] WTP Source Editing Reporter: Gábor Farkas <hhcofcmds>
Component: wst.htmlAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nick Sandonato <nsand.dev>
Severity: minor    
Priority: P3 CC: thatnitind
Version: unspecified   
Target Milestone: 3.4 M5   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Gábor Farkas CLA 2011-11-07 05:13:33 EST
Build Identifier: 20110218-0911

For a simplest reproduction, take this html snippet in an xhtml file:
<a x=">
  "something"
</a>
And put the cursor after the first quotation mark, then type a forward slash. The ending tag gets deleted. The reproduction only needs quotation marks in the element content.

This occured to me when I had a big script block and added the type="text/javascript" attribute to it, and realized after deployment that the ending script tag got deleted. Of course, eclipse automaticall adds the ending quotation mark when typing a new attribute, but many times I just mistype and delete the ending quotation mark.

Reproducible: Always

Steps to Reproduce:
Described in the details.
Comment 1 Nick Sandonato CLA 2012-01-04 13:21:39 EST
Changes released to correct the auto edit strategies for JSP, HTML, and XML. Thanks for the bug report.