Skip to content

Commit d4b01ef

Browse files
committed
Allow initial value of spellcheck to be non-false in a backwards-compatible way
1 parent 9843a45 commit d4b01ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

code-input.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,10 @@ var codeInput = {
657657
textarea.value = value;
658658
}
659659
textarea.innerHTML = this.innerHTML;
660-
textarea.setAttribute("spellcheck", "false");
660+
if(!this.hasAttribute("spellcheck")) {
661+
// For backwards compatibklity:
662+
textarea.setAttribute("spellcheck", "false");
663+
}
661664

662665
// Disable focusing on the code-input element - only allow the textarea to be focusable
663666
textarea.setAttribute("tabindex", this.getAttribute("tabindex") || 0);

0 commit comments

Comments
 (0)