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
Léo-Paul Géneau
gitlab-ce
Commits
f0608878
Commit
f0608878
authored
Dec 09, 2016
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug where dropdowns would not dismiss properly
parent
c18285ce
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
8 deletions
+15
-8
app/assets/javascripts/filtered_search/dropdown_assignee.js.es6
...sets/javascripts/filtered_search/dropdown_assignee.js.es6
+1
-1
app/assets/javascripts/filtered_search/dropdown_hint.js.es6
app/assets/javascripts/filtered_search/dropdown_hint.js.es6
+6
-3
app/assets/javascripts/filtered_search/dropdown_label.js.es6
app/assets/javascripts/filtered_search/dropdown_label.js.es6
+2
-1
app/assets/javascripts/filtered_search/dropdown_milestone.js.es6
...ets/javascripts/filtered_search/dropdown_milestone.js.es6
+1
-1
app/assets/javascripts/filtered_search/filtered_search_dropdown.js.es6
...vascripts/filtered_search/filtered_search_dropdown.js.es6
+5
-2
No files found.
app/assets/javascripts/filtered_search/dropdown_assignee.js.es6
View file @
f0608878
...
...
@@ -29,7 +29,7 @@
gl.FilteredSearchManager.addWordToInput(this.getSelectedText(username));
}
this.dismissDropdown();
this.dismissDropdown(
!dataValueSet
);
}
renderContent() {
...
...
app/assets/javascripts/filtered_search/dropdown_hint.js.es6
View file @
f0608878
...
...
@@ -34,16 +34,19 @@
itemClicked(e) {
const selected = e.detail.selected;
if (!selected.hasAttribute('data-value')) {
if (selected.hasAttribute('data-value')) {
this.dismissDropdown();
} else {
const token = selected.querySelector('.js-filter-hint').innerText.trim();
const tag = selected.querySelector('.js-filter-tag').innerText.trim();
if (tag.length) {
gl.FilteredSearchManager.addWordToInput(this.getSelectedText(token));
}
this.dismissDropdown();
this.dispatchInputEvent();
}
this.dismissDropdown();
}
renderContent() {
...
...
app/assets/javascripts/filtered_search/dropdown_label.js.es6
View file @
f0608878
...
...
@@ -26,7 +26,8 @@
gl.FilteredSearchManager.addWordToInput(labelName);
}
this.dismissDropdown();
// debugger
this.dismissDropdown(!dataValueSet);
}
renderContent() {
...
...
app/assets/javascripts/filtered_search/dropdown_milestone.js.es6
View file @
f0608878
...
...
@@ -26,7 +26,7 @@
gl.FilteredSearchManager.addWordToInput(this.getSelectedText(milestoneName));
}
this.dismissDropdown();
this.dismissDropdown(
!dataValueSet
);
}
renderContent() {
...
...
app/assets/javascripts/filtered_search/filtered_search_dropdown.js.es6
View file @
f0608878
...
...
@@ -77,11 +77,15 @@
}
dismissDropdown() {
this.getCurrentHook().list.hide();
this.input.focus();
}
dispatchInputEvent() {
// Propogate input change to FilteredSearchManager
// so that it can determine which dropdowns to open
this.input.dispatchEvent(new Event('input'));
}
}
render(forceRenderContent) {
this.setAsDropdown();
...
...
@@ -91,7 +95,6 @@
if (firstTimeInitialized || forceRenderContent) {
this.renderContent();
} else if(this.getCurrentHook().list.list.id !== this.listId) {
// this.droplab.changeHookList(this.hookId, `#${this.listId}`);
this.renderContent();
}
}
...
...
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