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

Unified Diff: LayoutTests/fast/events/key-events-in-editable-gridbox.html

Issue 870013003: Div having contentEditable and display:grid cannot be edited if it is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: ResolveConflict Created 5 years, 10 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/key-events-in-editable-gridbox-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/key-events-in-editable-gridbox.html
diff --git a/LayoutTests/fast/events/key-events-in-editable-gridbox.html b/LayoutTests/fast/events/key-events-in-editable-gridbox.html
new file mode 100644
index 0000000000000000000000000000000000000000..1bbbedef6fc10762404f343eeaa3be07424d6b7c
--- /dev/null
+++ b/LayoutTests/fast/events/key-events-in-editable-gridbox.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style>
+ #target {
+ display: grid;
+ display: -webkit-grid;
+ }
+</style>
+<div id="target" contentEditable>T</div>
+<script>
+ var targetDiv = document.getElementById('target');
+ targetDiv.focus();
+
+ // Move cursor to the end of line.
+ getSelection().modify('move', 'forward', 'lineboundary');
+
+ document.execCommand("insertText", false, "EST");
+ shouldBeEqualToString("targetDiv.innerText", "TEST");
+
+ document.execCommand("delete");
+ document.execCommand("delete");
+ document.execCommand("delete");
+ document.execCommand("delete");
+ shouldBeEmptyString("targetDiv.innerText");
+
+ document.execCommand("insertText", false, "TEST");
+ shouldBeEqualToString("targetDiv.innerText", "TEST");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/events/key-events-in-editable-gridbox-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698