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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
1732e140
Commit
1732e140
authored
Jun 29, 2017
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '34407-flickering-scroll-v1' into 'master'
Fix scroll flicker Closes #34407 See merge request !12501
parents
24972544
291309f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
app/assets/javascripts/right_sidebar.js
app/assets/javascripts/right_sidebar.js
+5
-3
No files found.
app/assets/javascripts/right_sidebar.js
View file @
1732e140
...
...
@@ -10,6 +10,8 @@ import Cookies from 'js-cookie';
this
.
$sidebarInner
=
this
.
sidebar
.
find
(
'
.issuable-sidebar
'
);
this
.
$navGitlab
=
$
(
'
.navbar-gitlab
'
);
this
.
$layoutNav
=
$
(
'
.layout-nav
'
);
this
.
$subScroll
=
$
(
'
.sub-nav-scroll
'
);
this
.
$rightSidebar
=
$
(
'
.js-right-sidebar
'
);
this
.
removeListeners
();
...
...
@@ -27,14 +29,14 @@ import Cookies from 'js-cookie';
Sidebar
.
prototype
.
addEventListeners
=
function
()
{
const
$document
=
$
(
document
);
const
throttledSetSidebarHeight
=
_
.
throttle
(
this
.
setSidebarHeight
.
bind
(
this
),
20
);
const
debouncedSetSidebarHeight
=
_
.
debounc
e
(
this
.
setSidebarHeight
.
bind
(
this
),
200
);
const
slowerThrottledSetSidebarHeight
=
_
.
throttl
e
(
this
.
setSidebarHeight
.
bind
(
this
),
200
);
this
.
sidebar
.
on
(
'
click
'
,
'
.sidebar-collapsed-icon
'
,
this
,
this
.
sidebarCollapseClicked
);
$
(
'
.dropdown
'
).
on
(
'
hidden.gl.dropdown
'
,
this
,
this
.
onSidebarDropdownHidden
);
$
(
'
.dropdown
'
).
on
(
'
loading.gl.dropdown
'
,
this
.
sidebarDropdownLoading
);
$
(
'
.dropdown
'
).
on
(
'
loaded.gl.dropdown
'
,
this
.
sidebarDropdownLoaded
);
$
(
window
).
on
(
'
resize
'
,
()
=>
throttledSetSidebarHeight
());
$document
.
on
(
'
scroll
'
,
()
=>
debounc
edSetSidebarHeight
());
$document
.
on
(
'
scroll
'
,
()
=>
slowerThrottl
edSetSidebarHeight
());
$document
.
on
(
'
click
'
,
'
.js-sidebar-toggle
'
,
function
(
e
,
triggered
)
{
var
$allGutterToggleIcons
,
$this
,
$thisIcon
;
e
.
preventDefault
();
...
...
@@ -213,7 +215,7 @@ import Cookies from 'js-cookie';
};
Sidebar
.
prototype
.
setSidebarHeight
=
function
()
{
const
$navHeight
=
this
.
$navGitlab
.
outerHeight
();
const
$navHeight
=
this
.
$navGitlab
.
outerHeight
()
+
this
.
$layoutNav
.
outerHeight
()
+
(
this
.
$subScroll
?
this
.
$subScroll
.
outerHeight
()
:
0
)
;
const
diff
=
$navHeight
-
$
(
window
).
scrollTop
();
if
(
diff
>
0
)
{
this
.
$rightSidebar
.
outerHeight
(
$
(
window
).
height
()
-
diff
);
...
...
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