1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

ui: Eliminate javascript:void, closes #130

This commit is contained in:
James Hillyerd
2018-11-23 17:26:09 -08:00
parent 6215ce77dd
commit ce59c87250
2 changed files with 11 additions and 2 deletions

View File

@@ -117,7 +117,16 @@ update msg model =
LinkClicked req -> LinkClicked req ->
case req of case req of
Browser.Internal url -> Browser.Internal url ->
( model, Nav.pushUrl model.session.key (Url.toString url), Session.none ) case url.fragment of
Just "" ->
-- Anchor tag for accessibility purposes only, already handled.
( model, Cmd.none, Session.none )
_ ->
( model
, Nav.pushUrl model.session.key (Url.toString url)
, Session.none
)
Browser.External url -> Browser.External url ->
( model, Nav.load url, Session.none ) ( model, Nav.load url, Session.none )

View File

@@ -573,7 +573,7 @@ messageBody message bodyMode =
a a
[ classList [ ( "active", bodyMode == mode ) ] [ classList [ ( "active", bodyMode == mode ) ]
, onClick (MessageBody mode) , onClick (MessageBody mode)
, href "javacript:void(0)" , href "#"
] ]
[ text label ] [ text label ]