From eb256b3ed52422c33459321f2a9cf745d5ef6adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 21 Dec 2017 13:52:03 +0100 Subject: [PATCH] Fix anchor change when clicking on sharing page menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Daniel Calviño Sánchez --- apps/files_sharing/templates/public.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index e17595d548..9d28c178dd 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -50,7 +50,7 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);