Skip to content
Commit eb256b3e authored by Daniel Calviño Sánchez's avatar Daniel Calviño Sánchez
Browse files

Fix anchor change when clicking on sharing page menu



The share menu toggle and some share menu items included an 'href="#"'
attribute, so they were handled as internal links by the browser, which
changed the current anchor when they were clicked. However, there was no
real need to change the anchor in those cases, and it could interfere
with other apps (for example, the PDF viewer sets the current anchor to
"#pdfviewer" when it is shown and it hides itself when that anchor is
modified). According to the HTML 5 spec the "href" attribute is not
mandatory for "a" elements, so they were removed.

Other options would have been to change the elements from "a" to "div"
or something like that, but that would have required changes to the CSS
rules too, or to prevent the default event handling for those elements
through JavaScript, which would have been a workaround instead of the
proper solution.

Signed-off-by: default avatarDaniel Calviño Sánchez <danxuliu@gmail.com>
parent dc8809e7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment