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

Bug 483924

Summary: [HTML][assist] Attribute completions ignore existing value entries =""
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: JS ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Carolyn_MacLeod
Version: 10.0   
Target Milestone: 11.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Curtis Windatt CLA 2015-12-08 11:12:34 EST
<html><a src="blah"></a></html>

Delete the c in 'src' and then activate the completion again, result is
<a src=""="blah">

We aren't checking if there is already a value for the attribute.  We should check this and modify the insertion text appropriately.
Comment 1 Curtis Windatt CLA 2015-12-08 11:13:55 EST
Car, you might end up working on this when you look at adding aria value content assist.  For now I can own it.
Comment 2 Curtis Windatt CLA 2016-01-11 12:57:16 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=628c3e0691b13fd25281334a909833681d84bf05
Fixed in master with tests

When there is an actual value in quotes, the fix is simple, just check if there is an existing value and if so don't put in the ="".  However, when there isn't a properly quoted value style="" style= style=blah, etc. the parser will return the value as undefined.  I had to modify the parser to return the correct (usually empty) string as the value in these cases. I added parser tests for this change.