Commit f5b9e287 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'ide-row-dropdown-scroll' into 'master'

Fixed Web IDE row dropdowns scrolling list incorrectly

Closes #49892

See merge request gitlab-org/gitlab-ce!20984
parents 18296bf1 9e5bc599
...@@ -35,7 +35,9 @@ export default { ...@@ -35,7 +35,9 @@ export default {
watch: { watch: {
dropdownOpen() { dropdownOpen() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.dropdownMenu.scrollIntoView(); this.$refs.dropdownMenu.scrollIntoView({
block: 'nearest',
});
}); });
}, },
mouseOver() { mouseOver() {
......
...@@ -62,7 +62,9 @@ describe('new dropdown component', () => { ...@@ -62,7 +62,9 @@ describe('new dropdown component', () => {
vm.dropdownOpen = true; vm.dropdownOpen = true;
setTimeout(() => { setTimeout(() => {
expect(vm.$refs.dropdownMenu.scrollIntoView).toHaveBeenCalled(); expect(vm.$refs.dropdownMenu.scrollIntoView).toHaveBeenCalledWith({
block: 'nearest',
});
done(); done();
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment