Migrate IgxOverlayService to native Popover API #16814
Draft
+115
−180
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Replaces manual overlay DIV management with browser's native Popover API. Elements now stay in DOM at original position, wrapped in-place with
popover="manual", eliminating z-index conflicts and leveraging the browser's top layer.Changes
Core Implementation (
overlay.ts)moveElementToOverlay(): Wraps element at current DOM position instead of moving to overlay container. Setspopover="manual"on wrapper.playOpenAnimation()/show(): CallsshowPopover()before animation starts, ensuring element is in top layer first.closeAnimationDone()/closeDone(): CallshidePopover()after close animation completes (or immediately if no animation).cleanUp(): Unwraps element, restores to original position using hook marker, removes wrapper. Includes state checking via:popover-openpseudo-class.Animation Timing
Styling (
_overlay-theme.scss)Removed z-index (top layer handles stacking). Important flags override UA defaults.
Behavior Preservation
Browser Support
Chrome/Edge 114+, Safari 17+, Firefox 125+
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.