diff --git a/asset/js/widget/ActionList.js b/asset/js/widget/ActionList.js index 137be7a5..60b4e90e 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.isDisplayContants = null; } bind() { @@ -402,6 +404,19 @@ define(["../notjQuery"], function ($) { * @param pressedKey Pressed key (`ArrowUp` or `ArrowDown`) */ scrollItemIntoView(item, pressedKey) { + if (this.isDisplayContants + || (! item.checkVisibility() && item.firstChild && item.firstChild.checkVisibility()) + ) { + // it's a pseudo item: display:contents, because the child is visible + this.isDisplayContants = 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);