From d7ef72561341d21004618688cc1d1700195b322a Mon Sep 17 00:00:00 2001 From: "Marc J. Schmidt" Date: Mon, 9 Dec 2013 18:01:31 +0100 Subject: [PATCH] Suppressed the auto-scrolling on click and fixed initial-jump issues. For the initial auto-scrolling to the selected route in location.hash: - Fixed typo in the calculation of the offset-top position. - Fixed requesting the selected route that has special chars (e.g. "/content/{page}") - Fixed for refreshes with F5. It needs a setTimeout workaround to get that working in Webkit. It needs also in Firefox a other dom element to fire scrollTop at. Fixed also some old .delegation calls, which are deprecated in jQuery 1.7. Why suppressing auto-scrolling on click: When clicking through all methods it's very annoying when the browser always jumps to the clicked method, especially when you go through all methods from bottom to up. This jump is unexpected and disturbing. --- Resources/views/layout.html.twig | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index 821f415..beea97c 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -49,10 +49,13 @@