BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6c57d894
Commit
6c57d894
authored
Sep 25, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fly-out-nav-mousepos-error' into 'master'
Fixed fly-out error if mousePos array is empty See merge request gitlab-org/gitlab-ce!14338
parents
4d88f649
35d189d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
fly_out_nav.js
app/assets/javascripts/fly_out_nav.js
+1
-1
fly_out_nav_spec.js
spec/javascripts/fly_out_nav_spec.js
+6
-0
No files found.
app/assets/javascripts/fly_out_nav.js
View file @
6c57d894
...
...
@@ -34,7 +34,7 @@ export const canShowActiveSubItems = (el) => {
export
const
canShowSubItems
=
()
=>
bp
.
getBreakpointSize
()
===
'sm'
||
bp
.
getBreakpointSize
()
===
'md'
||
bp
.
getBreakpointSize
()
===
'lg'
;
export
const
getHideSubItemsInterval
=
()
=>
{
if
(
!
currentOpenMenu
)
return
0
;
if
(
!
currentOpenMenu
||
!
mousePos
.
length
)
return
0
;
const
currentMousePos
=
mousePos
[
mousePos
.
length
-
1
];
const
prevMousePos
=
mousePos
[
0
];
...
...
spec/javascripts/fly_out_nav_spec.js
View file @
6c57d894
...
...
@@ -73,6 +73,12 @@ describe('Fly out sidebar navigation', () => {
).
toBe
(
0
);
});
it
(
'returns 0 if mousePos is empty'
,
()
=>
{
expect
(
getHideSubItemsInterval
(),
).
toBe
(
0
);
});
it
(
'returns 0 when mouse above sub-items'
,
()
=>
{
showSubLevelItems
(
el
);
documentMouseMove
({
...
...
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