blob: 72444a26f8b97bca3720c391761301ab0fd92dd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<!doctype html>
<html class="reftest-wait">
<title>contenteditable is selectable by default, even with a user-select: none ancestor</title>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<style>
:root {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
</style>
<div contenteditable="true">
Can you edit <b>me</b>?
</div>
<script>
SimpleTest.waitForFocus(function() {
const editable = document.querySelector('div[contenteditable="true"]');
editable.focus();
synthesizeMouseAtCenter(editable.querySelector("b"), {});
setTimeout(() => document.documentElement.removeAttribute("class"), 0);
});
</script>
|