Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bfd4ef43
Commit
bfd4ef43
authored
Dec 20, 2019
by
Jan Beckmann
Committed by
Kushal Pandya
Dec 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delay window.scrollBy in handleLocationHash to fix FF bug
Closes #19132
parent
23f058eb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+3
-1
changelogs/unreleased/19132-comment-anchor-twice-firefox.yml
changelogs/unreleased/19132-comment-anchor-twice-firefox.yml
+5
-0
spec/javascripts/lib/utils/common_utils_spec.js
spec/javascripts/lib/utils/common_utils_spec.js
+3
-0
No files found.
app/assets/javascripts/lib/utils/common_utils.js
View file @
bfd4ef43
...
...
@@ -135,7 +135,9 @@ export const handleLocationHash = () => {
adjustment
-=
topPadding
;
}
setTimeout
(()
=>
{
window
.
scrollBy
(
0
,
adjustment
);
});
};
// Check if element scrolled into viewport from above or below
...
...
changelogs/unreleased/19132-comment-anchor-twice-firefox.yml
0 → 100644
View file @
bfd4ef43
---
title
:
Fix bug when clicking on same note twice in Firefox
merge_request
:
21699
author
:
Jan Beckmann
type
:
fixed
spec/javascripts/lib/utils/common_utils_spec.js
View file @
bfd4ef43
...
...
@@ -88,10 +88,12 @@ describe('common_utils', () => {
describe
(
'
handleLocationHash
'
,
()
=>
{
beforeEach
(()
=>
{
spyOn
(
window
.
document
,
'
getElementById
'
).
and
.
callThrough
();
jasmine
.
clock
().
install
();
});
afterEach
(()
=>
{
window
.
history
.
pushState
({},
null
,
''
);
jasmine
.
clock
().
uninstall
();
});
function
expectGetElementIdToHaveBeenCalledWith
(
elementId
)
{
...
...
@@ -171,6 +173,7 @@ describe('common_utils', () => {
window
.
history
.
pushState
({},
null
,
'
#test
'
);
commonUtils
.
handleLocationHash
();
jasmine
.
clock
().
tick
(
1
);
expectGetElementIdToHaveBeenCalledWith
(
'
test
'
);
expectGetElementIdToHaveBeenCalledWith
(
'
user-content-test
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment