1
0
mirror of https://github.com/prometheus/alertmanager.git synced 2026-02-05 06:45:45 +01:00

Set spellcheck=false attribute on silence filter <input> (#4811)

* Set spellcheck=false attribute on silence filter <input>.

This hints to iOS Safari and other browsers that they shouldn't use
spellcheck, but, more importantly, shouldn't use smart quotes (like
“this” instead of "this"). This matters here because Alertmanager
requires quotes for a filter but won't accept smart quotes, making it
tedious since the default input keyboard will normally use them
automatically.

Signed-off-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>

* run `make assets`

Closes: #3529
Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>

---------

Signed-off-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Solomon Jacobs <solomonjacobs@protonmail.com>
Co-authored-by: David Symonds <dsymonds@gmail.com>
This commit is contained in:
Solomon Jacobs
2026-01-30 10:13:43 +01:00
committed by GitHub
parent b5df726c8f
commit aa3296c43f
2 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
module Views.FilterBar.Views exposing (view)
import Html exposing (Html, a, button, div, i, input, small, text)
import Html.Attributes exposing (class, disabled, href, id, style, value)
import Html.Attributes exposing (class, disabled, href, id, spellcheck, style, value)
import Html.Events exposing (onClick, onInput)
import Utils.Filter exposing (Matcher, convertFilterMatcher)
import Utils.Keyboard exposing (onKeyDown, onKeyUp)
@@ -125,6 +125,9 @@ view { showSilenceButton } { matchers, matcherText, backspacePressed } =
[ input
[ id "filter-bar-matcher"
, class "form-control"
-- Setting spellcheck=false on an input element will disable smartquotes in iOS.
, spellcheck False
, value matcherText
, onKeyDown keyDown
, onKeyUp keyUp