Skip to content

fix(page-controller): calculate visible clip rect for isTopElement to fix dropdown indexing (#519) - #591

Open
DakshLohchab wants to merge 1 commit into
alibaba:mainfrom
DakshLohchab:fix-issue-519
Open

fix(page-controller): calculate visible clip rect for isTopElement to fix dropdown indexing (#519)#591
DakshLohchab wants to merge 1 commit into
alibaba:mainfrom
DakshLohchab:fix-issue-519

Conversation

@DakshLohchab

Copy link
Copy Markdown

What

This PR fixes a bug where elementFromPoint() fails to identify dropdown options that are clipped by an overflow: auto/hidden container, specifically impacting Element UI / Avue dropdowns appended to the body.

I added a getVisibleClipRect helper that intersects the element's rect with its clipping ancestors. This ensures the sample points for isTopElement actually land inside the rendered region, correctly indexing all visible options.

Closes #519

Type

  • Bug fix

Requirements / 要求

  • I have read and follow the Code of Conduct and Contributing Guide . / 我已阅读并遵守行为准则。
  • This PR is NOT generated by a bot or AI agent acting autonomously. I have authored or meaningfully reviewed every change. / 此 PR 不是由 bot 或 AI 自主生成的,我已亲自编写或充分审查了每一处变更。

@CLAassistant

CLAassistant commented Jul 6, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Element UI / Avue dropdown options are partially indexed when appended to body

2 participants