don't case now that we use a single constructor

This commit is contained in:
Juan Edi 2020-09-08 15:26:06 -03:00
parent d4625ae274
commit 365d625cca

View File

@ -32,11 +32,9 @@ type FocusTrap
{-| Attach this attribute to add a focus trap to an HTML element.
-}
toAttribute : (String -> msg) -> FocusTrap -> Html.Attribute msg
toAttribute focus trap =
toAttribute focus (FocusTrap { firstId, lastId }) =
onTab <|
\elementId shiftKey ->
case trap of
FocusTrap { firstId, lastId } ->
-- if the user tabs back while on the first id,
-- we want to wrap around to the last id.
if elementId == firstId && shiftKey then