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
f3f9dedc
Commit
f3f9dedc
authored
Dec 19, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove transitionend event from GL dropdown
parent
325fdc9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
16 deletions
+8
-16
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+8
-16
No files found.
app/assets/javascripts/gl_dropdown.js
View file @
f3f9dedc
...
...
@@ -300,7 +300,7 @@ GitLabDropdown = (function() {
return
function
(
data
)
{
_this
.
fullData
=
data
;
_this
.
parseData
(
_this
.
fullData
);
_this
.
focusTextInput
(
true
);
_this
.
focusTextInput
();
if
(
_this
.
options
.
filterable
&&
_this
.
filter
&&
_this
.
filter
.
input
&&
_this
.
filter
.
input
.
val
()
&&
_this
.
filter
.
input
.
val
().
trim
()
!==
''
)
{
return
_this
.
filter
.
input
.
trigger
(
'
input
'
);
}
...
...
@@ -790,24 +790,16 @@ GitLabDropdown = (function() {
return
[
selectedObject
,
isMarking
];
};
GitLabDropdown
.
prototype
.
focusTextInput
=
function
(
triggerFocus
=
false
)
{
GitLabDropdown
.
prototype
.
focusTextInput
=
function
()
{
if
(
this
.
options
.
filterable
)
{
this
.
dropdown
.
one
(
'
transitionend
'
,
()
=>
{
const
initialScrollTop
=
$
(
window
).
scrollTop
();
const
initialScrollTop
=
$
(
window
).
scrollTop
();
if
(
this
.
dropdown
.
is
(
'
.open
'
))
{
this
.
filterInput
.
focus
();
}
if
(
$
(
window
).
scrollTop
()
<
initialScrollTop
)
{
$
(
window
).
scrollTop
(
initialScrollTop
);
}
});
if
(
this
.
dropdown
.
is
(
'
.open
'
))
{
this
.
filterInput
.
focus
();
}
if
(
triggerFocus
)
{
// This triggers after a ajax request
// in case of slow requests, the dropdown transition could already be finished
this
.
dropdown
.
trigger
(
'
transitionend
'
);
if
(
$
(
window
).
scrollTop
()
<
initialScrollTop
)
{
$
(
window
).
scrollTop
(
initialScrollTop
);
}
}
};
...
...
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