Input elements become unusable when new input elements are added with JavaScript after parent element is cleared using innerHTML

Fixed Issue #106319


Apr 27, 2014
This issue is public.
Found in build #
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce



Repro Steps:

Open the page with the attached code in IE 11 (also below).
Click the existing input element.
Press the tab key.
Enter one or more characters in the new input element (which will now have focus). (if no characters are entered, the bug will not occur)
Press the tab key.
All input elements on the page can no longer accept input.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"">
<html xmlns="” xml:lang="en" lang="en">
<title>IE11 Test</title>
<input id="input1" type="text" value=""/>
<div id="test">

<script type="text/javascript">
function inputKeyPressed(evt)
if(evt.which == 9)

var div = document.getElementById(“test”);
var input = document.createElement(“input”);
input.type = "text";
input.onkeydown = inputKeyPressed;
div.innerHTML = "";

return false;
document.getElementById(“input1”).onkeydown = inputKeyPressed;


Expected Results:

The input element should be editable. Oddly, its keyup / keypress events are fired, but its value is not changed.

Actual Results:


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “IPBS P.”

      Changed Assigned To from “IPBS P.” to “Bruce M.”

      Changed Assigned To to “Amit J.”

      Changed Assigned To from “Amit J.” to “Ben P.”

      Changed Steps to Reproduce

      Changed Status to “Confirmed”

      Changed Assigned To from “Ben P.” to “IPBS P.”

      Changed Status from “Confirmed” to “Fixed”

      Changed Assigned To from “IPBS P.” to “Ethan C.”

      Changed Assigned To from “Ethan C.” to “John J.”

    You need to sign in to your Microsoft account to add a comment.

    Sign in