diff --git a/src/Main.hs b/src/Main.hs index dc12510..b5ffca7 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1317,15 +1317,16 @@ textButton -> HtmlT IO () textButton caption (JS handler) = span_ [class_ "text-button"] $ - a_ [href_ "javascript:void(0)", onclick_ handler] (toHtml caption) - --- TODO: use # instead of javascript:void(0), the latter is slow in Firefox --- for me + -- “#” is used instead of javascript:void(0) because the latter is slow + -- in Firefox (at least for me – tested with Firefox 43 on Arch Linux) + a_ [href_ "#", onclick_ (handler <> "return false;")] + (toHtml caption) -- So far all icons used here have been from imgButton :: Url -> [Attribute] -> JS -> HtmlT IO () imgButton src attrs (JS handler) = - a_ [href_ "javascript:void(0)", onclick_ handler] (img_ (src_ src : attrs)) + a_ [href_ "#", onclick_ (handler <> "return false;")] + (img_ (src_ src : attrs)) uid_ :: Uid -> Attribute uid_ = id_ . uidToText diff --git a/static/css.css b/static/css.css index fc5adfa..55281a7 100644 --- a/static/css.css +++ b/static/css.css @@ -66,6 +66,7 @@ a:link {color: #008ACE; text-decoration: none;} a:visited {color: #B40EB4; text-decoration: none;} a:hover {text-decoration: underline;} a:active {text-decoration: underline;} +.text-button > a:visited {color: #008ACE;} a.anchor { margin-right: 0.5em;