From 14c5c9af75eab488b3f2aa20d06a240fb7e00f86 Mon Sep 17 00:00:00 2001 From: "T.S. Foster" Date: Tue, 16 Jun 2020 15:27:05 +0100 Subject: [PATCH] Prevent search boxes from auto-correcting --- src/frontend/Page/Docs.elm | 3 +++ src/frontend/Page/Search.elm | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontend/Page/Docs.elm b/src/frontend/Page/Docs.elm index e89da655..723486f5 100644 --- a/src/frontend/Page/Docs.elm +++ b/src/frontend/Page/Docs.elm @@ -484,6 +484,9 @@ viewSidebar model = [ placeholder "Search" , value model.query , onInput QueryChanged + , spellcheck False + , attribute "autocapitalize" "off" + , attribute "autocorrect" "off" ] [] , viewSidebarModules model diff --git a/src/frontend/Page/Search.elm b/src/frontend/Page/Search.elm index 20d160a5..1d8a0693 100644 --- a/src/frontend/Page/Search.elm +++ b/src/frontend/Page/Search.elm @@ -9,7 +9,7 @@ module Page.Search exposing import Elm.Version as V import Html exposing (..) -import Html.Attributes exposing (autofocus, class, href, placeholder, style, value) +import Html.Attributes exposing (autofocus, class, href, placeholder, style, value, spellcheck, attribute) import Html.Events exposing (..) import Html.Lazy exposing (..) import Html.Keyed as Keyed @@ -117,6 +117,9 @@ viewSearch query entries = , value query , onInput QueryChanged , autofocus True + , spellcheck False + , attribute "autocapitalize" "off" + , attribute "autocorrect" "off" ] [] , case entries of