legacy-knowledge-base
公開されました Jul. 2, 2025

iframeでボタンのドロップダウン・メニューがスクロールに追従する。

written-by

Brian Suh

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • この記事では、iframe内のスクロール操作にボタンのドロップダウンメニューが追従するケースと、その解決方法について詳しく説明します。

Environment

  • Liferay DXP 7.1

解決策

  • iframeの場合、 popper.jsはスクロール時にドロップダウンメニューを移動させます。 これを所定の位置に固定するために、以下の内容を記載してください:
    • data-display="static"

ここでは、ドロップダウン・ボタンのコードの完全な例を示します:

<button
      aria-expanded="false"
      aria-haspopup="true"
      class="btn btn-secondary dropdown-toggle"
 data-display="static"
      data-toggle="dropdown"
      id="dropdownAlignment1"
      type="button"
    >

did-this-article-resolve-your-issue

legacy-knowledge-base