Files
tubestation/layout/base/tests/bug1097242-1.html
Makoto Kato 43611a9a0a Bug 1450055 - Part 3. Update mochitests since focus event listener is system group. r=masayuki
The focus event listener in editor is system group, so synthesizeKey and/or synthesizeMouse doesn't work on focus event since editor doesn't initialize selection yet. So use setTimeout to work synthesizeKey and etc well.

Differential Revision: https://phabricator.services.mozilla.com/D15926
2019-01-08 16:50:14 +09:00

23 lines
675 B
HTML

<!DOCTYPE html>
<html class="reftest-wait">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<script>
function focused() {
document.documentElement.removeAttribute("class");
}
</script>
<body>
<div contenteditable spellcheck="false" onfocus="focused()"
style="outline: none">foo<span contenteditable=false
style="-moz-user-select: none">bar</span>baz</div>
<script>
SimpleTest.waitForFocus(() => {
SimpleTest.executeSoon(() => {
synthesizeMouseAtCenter(document.querySelector("span"), {});
});
});
</script>
</body>
</html>