FIX: Increase Indent Command Replaces DIV with BLOCKQUOTE (191044)



The information in this article applies to:

  • Microsoft Visual InterDev 6.0

This article was previously published under Q191044

SYMPTOMS

In Design view, if you click Increase Indent when the cursor is inside a <div> element, the <div> HTML tag is replaced with the < blockquote > element. This can cause data loss.

CAUSE

This is caused by a limitation in the way Design view is implemented.

RESOLUTION

Do not use Increase Indent to indent a <div> element. Instead, go to Source view and manually enclose the <div> element within < blockquote > tags.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3.

For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why>

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed

MORE INFORMATION

This is a data loss issue. Any attributes, except style attributes, that exist within the <div> tag are lost (that is, the attributes are not replicated in the resulting < blockquote > tag).

For instance, the following <div> element:

<div id=myDiv myCustomAttribute style="color:green">My div</div>

is converted to the following < blockquote > element:

< BLOCKQUOTE style="COLOR:green" >My div< /BLOCKQUOTE >

Steps to Reproduce Behavior

  1. Open an HTML file in Source view.
  2. In the body, create a <div> element that contains text. For example:

    <DIV id=myDiv style="color:green">Test Div</DIV>
  3. Switch to Design view.
  4. Place the cursor within the div tag's text.
  5. From the menu, click Format and Increase Indent.
  6. Switch back to Source view.
RESULT: The <div> tags are replaced with < blockquote > tags.

Modification Type:MinorLast Reviewed:3/7/2005
Keywords:kbBug kbEditor kbfix kbGrpDSASP kbide kbVisID600bug kbVS600sp3fix KB191044 kbAudDeveloper