Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

When you type text in a contentEditable div that contains a <br> tag in Internet Explorer 11 or Microsoft Edge, the <br> tag is deleted unexpectedly. This behavior occurs in a contentEditable div that hosts content that's separated by a <br> tag. 

For example, assume that you select Line2 in the following sample HTML and then type asdf:

<div contenteditable="true">
<span>
Line1
<br>
Line2
<br>
Line3
<br>
Line4
</span>
</div>

In this situation, not only is Line2 deleted but also the following <br> tag. Therefore, Line3 joins the text that you typed ("asdf") in Line2, as follows:

<div contenteditable="true">
<span>
Line1
<br>
asdfLine3
<br>
Line4
</span>
</div>

Note This issue occurs if one of the following conditions is true:

  • You press Shift+End to select the line where you'll enter the text.

  • You use the mouse pointer to click just before the <br> tag to select the location for entering the text.

Cause

This issue occurs because the selection tracker service adjusts the selection range during text insertion. The service calls the CSelectTracker::AdjustForCaretRequirements routine, and this moves the end markup pointer so that it includes the trailing line break tag. This, in turn, deletes the line break.

Resolution

To fix this issue, install the most recent cumulative security update for Internet Explorer. To do this, go to Microsoft Update. Additionally, see the technical information about the most recent cumulative security update for Internet Explorer.

Note This update was first included in the MS16-063: Security update for Internet Explorer: June 14, 2016.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×