From 768d18468aebf8971a256ae605c41b50f01f4970 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Mon, 12 Dec 2022 20:25:00 +0100 Subject: [PATCH] fix: Don't spellcheck number fields. (#6698) For the most part spellcheckers ignore numbers so this isn't an issue. But (for example) 'Infinity' is an English word that's hardcoded into Blockly, and other languages may spellcheck it as wrong. --- core/field_number.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/field_number.ts b/core/field_number.ts index b3e23d07c..a891f1c58 100644 --- a/core/field_number.ts +++ b/core/field_number.ts @@ -47,6 +47,9 @@ export class FieldNumber extends FieldInput { */ override SERIALIZABLE = true; + /** Don't spellcheck numbers. Our validator does a better job. */ + protected override spellcheck_ = false; + /** * @param opt_value The initial value of the field. Should cast to a number. * Defaults to 0. Also accepts Field.SKIP_SETUP if you wish to skip setup