Skip to content

Commit b16f02a

Browse files
author
Vladimir Kotal
committed
fix scrolling to symbol in Chrome
fixes #2943
1 parent b93c91b commit b16f02a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/web/Scripts.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ public String toHtml() {
112112
SCRIPTS.put("tablesorter-parsers", new FileScript("js/tablesorter-parsers-0.0.2.min.js", 13));
113113
SCRIPTS.put("tablesorter-parsers" + DEBUG_SUFFIX, new FileScript("js/tablesorter-parsers-0.0.2.js", 13));
114114
SCRIPTS.put("searchable-option-list", new FileScript("js/searchable-option-list-2.0.7.min.js", 14));
115-
SCRIPTS.put("utils", new FileScript("js/utils-0.0.32.min.js", 15));
116-
SCRIPTS.put("utils" + DEBUG_SUFFIX, new FileScript("js/utils-0.0.32.js", 15));
115+
SCRIPTS.put("utils", new FileScript("js/utils-0.0.33.min.js", 15));
116+
SCRIPTS.put("utils" + DEBUG_SUFFIX, new FileScript("js/utils-0.0.33.js", 15));
117117
SCRIPTS.put("repos", new FileScript("js/repos-0.0.2.min.js", 20));
118118
SCRIPTS.put("repos" + DEBUG_SUFFIX, new FileScript("js/repos-0.0.2.js", 20));
119119
SCRIPTS.put("diff", new FileScript("js/diff-0.0.4.min.js", 20));

opengrok-web/src/main/webapp/js/utils-0.0.32.js renamed to opengrok-web/src/main/webapp/js/utils-0.0.33.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
}
209209

210210
if (match) {
211-
anchorOffset = $(match).offset().top - this.getFixedOffset();
211+
anchorOffset = $(match.nextElementSibling).offset().top - this.getFixedOffset();
212212
$('html, body').animate({scrollTop: anchorOffset});
213213

214214
location.hash = href;

0 commit comments

Comments
 (0)