Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: third_party/WebKit/LayoutTests/fast/events/keypress-focus-change.html

Issue 2628763003: Keyboard event should not insert a character at selection if selection doesn't have focus (Closed)
Patch Set: 2017-01-12T13:25:32 Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/events/keypress-focus-change.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/keypress-focus-change.html b/third_party/WebKit/LayoutTests/fast/events/keypress-focus-change.html
index 4b2ad6acb818405e44b2b83f0a440c0226ad7c04..344c615205a5dbfd8f9d5b528ffdd4e11ab63f49 100644
--- a/third_party/WebKit/LayoutTests/fast/events/keypress-focus-change.html
+++ b/third_party/WebKit/LayoutTests/fast/events/keypress-focus-change.html
@@ -15,7 +15,7 @@
eventSender.keyDown("2");
eventSender.keyDown("3");
}
- if (tf0.value == "1" && tf1.value == "23") {
+ if (tf0.value == "" && tf1.value == "23") {
res.innerHTML = "Test Passed";
} else {
res.innerHTML = "Test Failed: first field = " + tf0.value + " second field = " + tf1.value;
@@ -25,7 +25,8 @@
</script>
<body onload="test()">
This tests that when the keyPress event handler changes focus to a new form field,<br>
- that the key will still be inserted in the original field that was the target of the event.<br>
+ that the key will not be inserted in the original field that was the target of the event.<br>
+ Note: Edge will not inserted. Firefox and WebKit will insert.
<input id="tf0" onkeypress="document.getElementById('fr').contentDocument.getElementById('tf1').focus();">
<iframe id="fr" style="border: solid thin black;" src="resources/keypress-frame.html"></iframe>
<br>

Powered by Google App Engine
This is Rietveld 408576698