summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-010.html
blob: 16275f10e9e2af6665473400cfa43843fd201d09 (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
26
27
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Turning off spellcheck by making input elements disabled</title>
<link rel=match href="references/spelling-markers-001-ref.html">
<link rel=help href="https://html.spec.whatwg.org/multipage/interaction.html#spelling-and-grammar-checking">
<meta name=assert content="Spellchecking stops applying to input elements when they become disabled">

<style>
#test {
  /* Match the ref */
  all: initial;
  width: 100%;
  display: block;
  font-family: inherit;
}
</style>

<input type=text id=test value="This test passes if there is no visual marker indicating the spellinnnnnggg mistake in this sentence, and fails otherwise.">

<script>
  var test = document.getElementById("test");
  // Force spellcheck by focus then blur
  test.focus();
  test.blur();
  test.setAttribute("disabled", true);
</script>