-
Notifications
You must be signed in to change notification settings - Fork 278
fix(OpenUI5Support): fix closing popups with escape key #12278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue with closing popups when the escape key is pressed in a mixed environment of OpenUI5 and UI5 Web Components. The fix ensures proper event handling and prevents interference between OpenUI5 and Web Component popup escape key behavior.
Key changes:
- Added event marking utilities to prevent conflicts between popup systems
- Modified popup registry to check for marked events before handling escape
- Updated ComboBox escape key handling to be more selective about propagation
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/main/test/pages/DialogAndOpenUI5Dialog.html | Added comprehensive test scenarios with mixed OpenUI5 and Web Component popups |
packages/main/src/popup-utils/OpenedPopupsRegistry.ts | Added event marking check to prevent handling already-processed escape events |
packages/main/src/ComboBox.ts | Refined escape key handling to only stop propagation when value is reset |
packages/main/cypress/specs/OpenUI5andWebCPopups.cy.tsx | Added Cypress tests for mixed popup scenarios and escape key behavior |
packages/base/src/util/openui5support/eventMarking.ts | New utility for marking events to prevent duplicate handling |
packages/base/src/features/patchPopup.ts | Added popup control patching to prevent escape handling when Web Components are above |
packages/base/src/features/OpenUI5Support.ts | Updated to include Dialog and Popover controls in the patching process |
Comments suppressed due to low confidence (1)
packages/base/src/features/patchPopup.ts:1
- There's a mismatch between the parameter type and the property being patched. Line 96 should patch
PopupControl.prototype.onsapescape
notPopup.prototype.onsapescape
.
// OpenUI5's Control.js subset
No description provided.