summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-input-element/anchor-active-contenteditable.html
blob: 88a9a35cc57db82323725559d8b0e2a202b3d7b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
<link rel="help" href="http://crbug.com/1007941">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>

<!-- This behavior is not explicitly specified. -->

<a id=anchorid href="nonexistant">anchor</a>

<script>
anchorid.addEventListener('mousedown', () => {
  anchorid.contentEditable = true;
});

promise_test(async () => {
  await test_driver.click(anchorid);
  assert_equals(document.querySelector(':active'), null);
}, 'Anchor elements should not stay :active when contentEditable is enabled.');
</script>