4 <style type=
"text/css">
6 -webkit-user-select: none
;
11 <p id=
"sample" class=
"text">some text
</p>
14 // When Shift+Click in selection range, and make event target to change to
15 // user-select:none with Mac editing behavior causes crash.
16 // Note: When we have contents other than "p" element, the crash isn't occurred.
17 if (window
.testRunner
)
18 testRunner
.dumpAsText();
21 var sample
= document
.getElementById('sample');
22 var selection
= window
.getSelection();
23 selection
.selectAllChildren(sample
);
24 sample
.addEventListener('mousedown', function(event
) {
26 event
.currentTarget
.classList
.add('no-select');
29 if (!window
.eventSender
|| !window
.internals
)
31 internals
.settings
.setEditingBehavior("mac");
32 eventSender
.mouseMoveTo(sample
.offsetLeft
+ 5, sample
.offsetTop
+ 5);
33 eventSender
.mouseDown(0, ['shiftKey']);
34 document
.body
.textContent
= 'PASS; not crashed';