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
e5b406d6
Commit
e5b406d6
authored
Jun 29, 2018
by
Clement Ho
Committed by
Mike Greiling
Jun 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace deprecated bs.affix in merge request tabs with sticky polyfill
parent
436d17a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
17 deletions
+7
-17
app/assets/javascripts/merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+2
-17
changelogs/unreleased/47661-merge-request-box-disappearing-on-chrome.yml
...leased/47661-merge-request-box-disappearing-on-chrome.yml
+5
-0
No files found.
app/assets/javascripts/merge_request_tabs.js
View file @
e5b406d6
...
@@ -16,6 +16,7 @@ import Diff from './diff';
...
@@ -16,6 +16,7 @@ import Diff from './diff';
import
{
localTimeAgo
}
from
'
./lib/utils/datetime_utility
'
;
import
{
localTimeAgo
}
from
'
./lib/utils/datetime_utility
'
;
import
syntaxHighlight
from
'
./syntax_highlight
'
;
import
syntaxHighlight
from
'
./syntax_highlight
'
;
import
Notes
from
'
./notes
'
;
import
Notes
from
'
./notes
'
;
import
{
polyfillSticky
}
from
'
./lib/utils/sticky
'
;
/* eslint-disable max-len */
/* eslint-disable max-len */
// MergeRequestTabs
// MergeRequestTabs
...
@@ -426,7 +427,6 @@ export default class MergeRequestTabs {
...
@@ -426,7 +427,6 @@ export default class MergeRequestTabs {
initAffix
()
{
initAffix
()
{
const
$tabs
=
$
(
'
.js-tabs-affix
'
);
const
$tabs
=
$
(
'
.js-tabs-affix
'
);
const
$fixedNav
=
$
(
'
.navbar-gitlab
'
);
// Screen space on small screens is usually very sparse
// Screen space on small screens is usually very sparse
// So we dont affix the tabs on these
// So we dont affix the tabs on these
...
@@ -439,21 +439,6 @@ export default class MergeRequestTabs {
...
@@ -439,21 +439,6 @@ export default class MergeRequestTabs {
*/
*/
if
(
$tabs
.
css
(
'
position
'
)
!==
'
static
'
)
return
;
if
(
$tabs
.
css
(
'
position
'
)
!==
'
static
'
)
return
;
const
$diffTabs
=
$
(
'
#diff-notes-app
'
);
polyfillSticky
(
$tabs
);
$tabs
.
off
(
'
affix.bs.affix affix-top.bs.affix
'
)
.
affix
({
offset
:
{
top
:
()
=>
$diffTabs
.
offset
().
top
-
$tabs
.
height
()
-
$fixedNav
.
height
(),
},
})
.
on
(
'
affix.bs.affix
'
,
()
=>
$diffTabs
.
css
({
marginTop
:
$tabs
.
height
()
}))
.
on
(
'
affix-top.bs.affix
'
,
()
=>
$diffTabs
.
css
({
marginTop
:
''
}));
// Fix bug when reloading the page already scrolling
if
(
$tabs
.
hasClass
(
'
affix
'
))
{
$tabs
.
trigger
(
'
affix.bs.affix
'
);
}
}
}
}
}
changelogs/unreleased/47661-merge-request-box-disappearing-on-chrome.yml
0 → 100644
View file @
e5b406d6
---
title
:
Replace deprecated bs.affix in merge request tabs with sticky polyfill
merge_request
:
author
:
type
:
fixed
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