Disable the grammarly plugin on all textareas to prevent inserted nodes from crashing the vdom (#2061)

Signed-off-by: Stephen Reddekopp <stephen.reddekopp@gmail.com>
This commit is contained in:
Stephen Reddekopp 2019-10-04 04:00:22 -05:00 committed by Simon Pasquier
parent bad2e792ca
commit f3a2ff8b7f
2 changed files with 11 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -150,6 +150,7 @@ validatedTextareaField labelText classes inputMsg blurMsg field =
, onBlur blurMsg
, class "form-control form-control-success"
, rows lineCount
, disableGrammarly
]
[]
]
@ -163,6 +164,7 @@ validatedTextareaField labelText classes inputMsg blurMsg field =
, onBlur blurMsg
, class "form-control"
, rows lineCount
, disableGrammarly
]
[]
]
@ -176,6 +178,7 @@ validatedTextareaField labelText classes inputMsg blurMsg field =
, onBlur blurMsg
, class "form-control form-control-danger"
, rows lineCount
, disableGrammarly
]
[]
, div [ class "form-control-feedback" ] [ text error_ ]
@ -194,7 +197,7 @@ textField : String -> String -> String -> (String -> msg) -> Html msg
textField labelText content classes msg =
div [ class <| "d-flex flex-column " ++ classes ]
[ label [] [ strong [] [ text labelText ] ]
, textarea [ value content, onInput msg ] []
, textarea [ value content, onInput msg, disableGrammarly ] []
]
@ -237,3 +240,8 @@ error : String -> Html msg
error err =
div [ class "alert alert-warning" ]
[ text (Utils.String.capitalizeFirst err) ]
disableGrammarly : Html.Attribute msg
disableGrammarly =
attribute "data-gramm_editor" "false"