Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
5b650db2d6
commit
6182b82892
|
|
@ -90,6 +90,9 @@ export default {
|
||||||
items() {
|
items() {
|
||||||
this.selectedIndex = 0;
|
this.selectedIndex = 0;
|
||||||
},
|
},
|
||||||
|
selectedIndex() {
|
||||||
|
this.scrollIntoView();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -182,6 +185,10 @@ export default {
|
||||||
this.selectItem(this.selectedIndex);
|
this.selectItem(this.selectedIndex);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
scrollIntoView() {
|
||||||
|
this.$refs.dropdownItems[this.selectedIndex].$el.scrollIntoView({ block: 'nearest' });
|
||||||
|
},
|
||||||
|
|
||||||
selectItem(index) {
|
selectItem(index) {
|
||||||
const item = this.items[index];
|
const item = this.items[index];
|
||||||
|
|
||||||
|
|
@ -209,6 +216,7 @@ export default {
|
||||||
<div class="gl-new-dropdown-inner gl-overflow-y-auto">
|
<div class="gl-new-dropdown-inner gl-overflow-y-auto">
|
||||||
<gl-dropdown-item
|
<gl-dropdown-item
|
||||||
v-for="(item, index) in items"
|
v-for="(item, index) in items"
|
||||||
|
ref="dropdownItems"
|
||||||
:key="index"
|
:key="index"
|
||||||
:class="{ 'gl-bg-gray-50': index === selectedIndex }"
|
:class="{ 'gl-bg-gray-50': index === selectedIndex }"
|
||||||
@click="selectItem(index)"
|
@click="selectItem(index)"
|
||||||
|
|
|
||||||
|
|
@ -30736,6 +30736,12 @@ msgstr ""
|
||||||
msgid "PreScanVerification|Test your configuration and identify potential errors before running a full scan."
|
msgid "PreScanVerification|Test your configuration and identify potential errors before running a full scan."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "PreScanVerification|The last pre-scan verification job is no longer valid because this scan’s configuration has changed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "PreScanVerification|The pre-scan verification status was reset for this scan"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "PreScanVerification|Verification checks"
|
msgid "PreScanVerification|Verification checks"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -36626,6 +36632,9 @@ msgstr ""
|
||||||
msgid "SecurityReports|All activity"
|
msgid "SecurityReports|All activity"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "SecurityReports|All severities"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "SecurityReports|Although it's rare to have no vulnerabilities, it can happen. Check your settings to make sure you've set up your dashboard correctly."
|
msgid "SecurityReports|Although it's rare to have no vulnerabilities, it can happen. Check your settings to make sure you've set up your dashboard correctly."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -313,5 +313,21 @@ RSpec.shared_examples 'edits content using the content editor' do
|
||||||
|
|
||||||
expect(page).not_to have_css(suggestions_dropdown)
|
expect(page).not_to have_css(suggestions_dropdown)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'scrolls selected item into view when navigating with keyboard' do
|
||||||
|
type_in_content_editor ':'
|
||||||
|
|
||||||
|
expect(find(suggestions_dropdown)).to have_text('hundred points symbol')
|
||||||
|
|
||||||
|
expect(dropdown_scroll_top).to be 0
|
||||||
|
|
||||||
|
send_keys :arrow_up
|
||||||
|
|
||||||
|
expect(dropdown_scroll_top).to be > 100
|
||||||
|
end
|
||||||
|
|
||||||
|
def dropdown_scroll_top
|
||||||
|
evaluate_script("document.querySelector('#{suggestions_dropdown} .gl-new-dropdown-inner').scrollTop")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue