Home Dashboard Directory Help
Search

Auto insert closing tag in HTML files (Razor, plain HTML5, web forms) does not work in VS2012 RTM by centiva


Status: 

Closed
 as Fixed Help for as Fixed


6
2
Sign in
to vote
Type: Bug
ID: 758970
Opened: 8/21/2012 2:23:25 PM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

The issue I reported for RC is still present in the RTM. Just tried it out today.

https://connect.microsoft.com/VisualStudio/feedback/details/749745/auto-insert-closing-tag-in-html-view-in-razor-views-does-not-work-in-vs2012-rc
Details
Sign in to post a comment.
Posted by Microsoft on 9/26/2012 at 3:50 PM
Please see a work-around for this issue at: http://blogs.msdn.com/b/webdev/archive/2012/09/26/workaround-for-html-closing-tag-problem.aspx
Posted by Martin Vích on 9/26/2012 at 12:27 AM
This could definitely be my case since I use czech keyboard layout and I press right Alt to write both < and >
Posted by Microsoft on 9/25/2012 at 4:27 PM
I can reproduce this problem now. We are looking for the solution.
The key is that the keyboard is Slovenian.
This should affect any language that requires pressing the Alt key to type < or >.
Posted by Microsoft on 9/25/2012 at 10:57 AM
Can you contact me directly at vank@microsoft.com?
We'd like to send you a tool for collecting a command trace log.
Posted by Microsoft on 9/25/2012 at 9:13 AM
I don't see the attachment, but will check again later. I agree that it is highly unlikely that the settings will reveal the root cause.
Our dev lead has reviewed the code and says nothing outside the settings file will affect this behavior, "unless somehow we are not getting proper commands from the core editor but we should see more problems if that’s the case."
Are there any other deviations from VS 2010 behavior in the HTML editor? Lesser bugs that you have not reported, or have reported separately?
I will investigate how we can trace the command chain to explore that possibility.
Posted by Martin Vích on 9/25/2012 at 2:50 AM
I've uploaded my VS settings. But since I've tried reseting settings to General, C# Developmnent and Web development with no effect I doubt it will be of any use.

I've also tried another doctypes instead of HTML 5 with no effect either.
Posted by centiva on 9/24/2012 at 4:25 PM
Another thing about the <br> tag - the editor does not auto close it and if you leave it as <br> but have the doctype set to HTML5 it will still underline it with green waves and say Validation: HTML5 Empty elements such as <br> must end with />.

All in all I think the HTML editor needs quite a few fixes because it's clearly out of tune with standards (besides not working for editing correctly too).
Posted by centiva on 9/24/2012 at 4:20 PM
Having installed fresh on a machine where VS2010 was also present, I selected not to transfer the settings from VS2010 to 2012 at first start. Second, I chose "Web Development" profile for my profile. I opened a new ASP.NET MVC 4 project and created a new layout view. I checked the settings for HTML formatting in options and it is already set to auto insert close tags.

This what I tried then: if you type in <a> then the editor won't insert the closing </a> tag automatically. However, if I enter <a class="" and then finish it with the closing ">" the editor will automatically at the same moment insert the closing "</a>" tag. If, for instance, I enter <aside> (just like that, type it out) it won't insert </aside> automatically. If you add an attribute to the tag and then close it with ">, the editor apparently does add the closing tag automatically for all tags. The <br> tag is special case. I know HTML5 does not require closing selfcontained tags but I do it anyway. I would expect the editor will autoclose (rewrite) the <br> as <br/> but it doesn't.

HTH

the settings are default for fresh install and Web Development profile so I won't be posting them if not necessary
Posted by centiva on 9/24/2012 at 3:31 PM
I'll get you my settings, let me just install vs2012 again (I had some hardware issues so I had to reformat) and we'll see.
Posted by Microsoft on 9/24/2012 at 1:27 PM
We're reviewing the code path for any clues as to what can be causing this.
I see other users have upvoted this, so it's not unique.
We've had automation in place to verify this since the beginning of VS2012, and never caught a regression in this area. I've been unable to reproduce it. Your experiencing it on a clean system is the most puzzling case yet.

Could you export and attach your settings file? Even if it doesn't answer the question, it could help eliminate a wide area. I'm trying hard to find a cause for this.
Posted by Martin Vích on 9/21/2012 at 6:50 AM
Hello, I'm experiencing same issue on my fresh-reinstalled machine. Only extension I've installed is Theme Editor which I've instelled after experiencing noticing this problem. Here is my Visual Studion info.

Microsoft Visual Studio Premium 2012
Version 11.0.50727.1 RTMREL
Microsoft .NET Framework
Version 4.5.50709

Installed Version: Premium

LightSwitch for Visual Studio 2012 04941-004-0044006-02047
Microsoft LightSwitch for Visual Studio 2012

Office Developer Tools 04941-004-0044006-02047
Microsoft Office Developer Tools

Team Explorer for Visual Studio 2012 04941-004-0044006-02047
Microsoft Team Explorer for Visual Studio 2012

Visual Basic 2012 04941-004-0044006-02047
Microsoft Visual Basic 2012

Visual C# 2012 04941-004-0044006-02047
Microsoft Visual C# 2012

Visual C++ 2012 04941-004-0044006-02047
Microsoft Visual C++ 2012

Visual F# 2012 04941-004-0044006-02047
Microsoft Visual F# 2012

Visual Studio 2012 Code Analysis Spell Checker 04941-004-0044006-02047
Microsoft® Visual Studio® 2012 Code Analysis Spell Checker

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.

Visual Studio 2012 SharePoint Developer Tools 04941-004-0044006-02047
Microsoft Visual Studio 2012 SharePoint Developer Tools

Color Theme Designer 1.0
Designer for creating new color themes

NuGet Package Manager 2.0.30717.9005
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer 1.0
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools 11.1.20627.00
Microsoft SQL Server Data Tools

Web Developer Tools 1.0.30710.0
Microsoft Web Developer Tools contains the following components:
Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
Web Form Templates: Includes the default templates for Web Form Applications.
Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.
Posted by Microsoft on 9/17/2012 at 12:31 PM
Hello,
Can you open the "Help/About Microsoft Visual Studio" dialog, press the "Copy Info" button, and post the results?
Posted by Microsoft on 8/21/2012 at 9:39 PM
Thanks for your feedback. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 8/21/2012 at 2:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
NPC.CANCELLATIONLETTER.doc 10/13/2012 10 KB
NEWSIGMAFASHION.doc 10/13/2012 13 KB