From 9fc0701c29bec4ddcc8c9ef6e5d7206b1f59c0b2 Mon Sep 17 00:00:00 2001 From: Stephanie Leary Date: Mon, 9 Jan 2023 10:23:59 -0600 Subject: [PATCH] LP2002327 Disable spellcheck for eg-combobox Adds a spellcheck option to eg-combobox for use with free text boxes that do not include sensitive data, but sets it to false by default. Signed-off-by: Stephanie Leary --- Open-ILS/src/eg2/src/app/share/combobox/combobox.component.html | 3 ++- Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.html b/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.html index e498670032..f73143a5da 100644 --- a/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.html +++ b/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.html @@ -38,7 +38,8 @@ (blur)="onBlur()" container="body" (selectItem)="selectorChanged($event)" - #instance="ngbTypeahead"/> + #instance="ngbTypeahead" + [spellcheck]="spellcheck" />
keyboard_arrow_up keyboard_arrow_down diff --git a/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts b/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts index 735f44a64f..ed612c514b 100644 --- a/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts +++ b/Open-ILS/src/eg2/src/app/share/combobox/combobox.component.ts @@ -73,6 +73,11 @@ export class ComboboxComponent @Input() allowFreeText = false; + // Set this to true for free text inputs only if the data is not sensitive. + // Do not allow spellchecking for users' personal data, like names and government IDs, + // since some browsers use remote services to check spelling. + @Input() spellcheck = false; + @Input() inputSize: number = null; // If true, applies form-control-sm CSS -- 2.11.0