diff --git a/asset/js/widget/ActionList.js b/asset/js/widget/ActionList.js index 137be7a5..5db19590 100644 --- a/asset/js/widget/ActionList.js +++ b/asset/js/widget/ActionList.js @@ -14,6 +14,8 @@ define(["../notjQuery"], function ($) { this.lastActivatedItemUrl = null; this.lastTimeoutId = null; this.processing = false; + + this.isDisplayContents = null; } bind() { @@ -402,6 +404,19 @@ define(["../notjQuery"], function ($) { * @param pressedKey Pressed key (`ArrowUp` or `ArrowDown`) */ scrollItemIntoView(item, pressedKey) { + if (this.isDisplayContents + || (! item.checkVisibility() && item.firstChild && item.firstChild.checkVisibility()) + ) { + // it's a pseudo item: display:contents, because the child is visible + this.isDisplayContents = true; + item.firstChild.scrollIntoView({block: "nearest"}); + let directionalNext = this.getDirectionalNext(item, pressedKey); + + if (directionalNext) { + directionalNext.firstChild.scrollIntoView({block: "nearest"}); + } + } + item.scrollIntoView({block: "nearest"}); let directionalNext = this.getDirectionalNext(item, pressedKey);