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

Side by Side Diff: LayoutTests/editing/selection/user-select-none-in-editable.html

Issue 17225002: Make user-select:none not to affect editability (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-06-19T18:10:01 Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <style>
2 .user-select-none {
3 -webkit-user-select: none;
4 -khtml-user-select: none;
5 -moz-user-select: none;
6 -ms-user-select: none;
7 -o-user-select: none;
8 user-select: none;
9 }
10 </style>
11 <script src="../../fast/js/resources/js-test-pre.js"></script>
12 <div id="container">
13 <p id="description"></p>
14 Manual step:
15 <ol>
16 <li>Move caret after "c"</li>
17 <li>Hit right arrow key twice</li>
18 <li>Caret should be after "Y"</li>
19 </ol>
20 <div id="sample1" contenteditable="true">
21 abc<span id="sample2" class="user-select-none">XYZ</span>def
22 </div>
23 </div>
24 <script>
25 function $(id) { return document.getElementById(id); }
26 description('Test caret movement into user-select:none content.');
27
28 var sample1 = $('sample1');
29 var sample2 = $('sample2');
30 var selection = window.getSelection();
31 selection.setPosition(sample1, 1);
32 selection.modify('move', 'forward', 'character');
33 selection.modify('move', 'forward', 'character');
34 shouldBe('selection.focusNode', 'sample2.firstChild');
35 shouldBe('selection.focusOffset', '2');
36
37 if (window.testRunner)
38 $('container').outerHTML = '';
39 </script>
40 <script src="../../fast/js/resources/js-test-post.js"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698