Added changes to fix modal backdrop issue#2410
Added changes to fix modal backdrop issue#24101307-Dev wants to merge 3 commits intosiemens:mainfrom
Conversation
|
Summary of ChangesHello @1307-Dev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a bug in the modal component where clicking on certain interactive elements, such as dropdowns or selects, that extend visually outside the modal's bounding box would cause the modal to unexpectedly close when the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request successfully addresses the issue where clicking overflowing components inside a modal (such as dropdowns or selects) causes the modal to close when closeOnBackdropClick is enabled. The fix introduces a check to see if the click target belongs to specific components (IX-DROPDOWN or IX-SELECT) that are descendants of the modal.
While effective, the current implementation has some maintenance and performance drawbacks: it uses a hardcoded list of tags and performs manual DOM traversal on every mouse event. I have suggested a more generic and performant approach that leverages the event target and the existing dialog element to distinguish between content and backdrop clicks without needing to know specific component tags.
|



💡 What is the current behavior?
When anything component inside modal content is clicked which extends beyond the border for the modal when close on backdrop click property is true, the modal closes.
GitHub Issue Number: #2401
Jira Ticket Number: IX-3980
🆕 What is the new behavior?
Checks the dom correctly and doesn't close the modal as long as the component belongs inside the modal.
🏁 Checklist
A pull request can only be merged if all of these conditions are met (where applicable):
pnpm test)pnpm lint)pnpm build, changes pushed)👨💻 Help & support