From 672a55522935e14fa8fa31613fe510058925ae63 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Tue, 31 Oct 2017 22:45:24 -0400 Subject: [PATCH] Allow spellcheck in textarea fields (closes #4471) --- modules/util/util.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/util/util.js b/modules/util/util.js index c9a22fa43..5c93b5c9c 100644 --- a/modules/util/util.js +++ b/modules/util/util.js @@ -255,9 +255,11 @@ export function utilFunctor(value) { export function utilNoAuto(selection) { + var isText = (selection.size() && selection.node().tagName.toLowerCase() === 'textarea'); + return selection .attr('autocomplete', 'off') .attr('autocorrect', 'off') .attr('autocapitalize', 'off') - .attr('spellcheck', 'false'); + .attr('spellcheck', isText ? 'true' : 'false'); }