Repository navigation
Replace ember-modal-dialog with native <dialog> and Popover API - #1710
Open
andreisebastianc wants to merge 1 commit into
Open
andreisebastianc wants to merge 1 commit into
andreisebastianc wants to merge 1 commit into
Conversation
ember-modal-dialog (and its ember-tether/ember-wormhole dependencies) is unmaintained and blocks upgrading consuming apps. The three places that used it now rely on browser primitives instead: - Search results and the version selector are `popover="manual"` elements rendered in the top layer and placed next to their anchor with CSS anchor positioning (`position-anchor` / `position-area`, with `@position-try` fallbacks that pin to the viewport edge or flip, like ember-tether's "pin" constraint did). Browsers that support popovers but not anchor positioning (Safari 17/18, Firefox < 147) fall back to inline top/left styles computed from the anchor's bounding box. - The keyboard shortcuts modal is a native `<dialog>` opened with `showModal()`: the browser provides the backdrop, focus trapping, inert page content, Escape handling and (where supported) light dismiss via `closedby="any"`; a click-on-backdrop fallback covers older browsers. Behavioural fixes that came with this: - A long list of versions now scrolls inside the dropdown instead of running off the bottom of the viewport. - Clicking the search input no longer closes the results and clears the query (the old click-outside handler did not exclude the anchor). - Escape closes the version selector. - The dialog close control is a <button> instead of an `href="#"` link, and the page behind the open dialog no longer scrolls. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Author
|
What's this: I use ember-cli-addon-docs at my workplace. For a long time, it's been clear to me that the addon will have trouble moving to newer ember versions because of several abandoned addons like ember-modal-dialog. I think simply inlining the addon code is not a good idea, even if other deprecated addons like ember-tether would be inlined at the same time. I've made sure to use modifiers instead of This implementation maintains feature parity, for better or worse. P.S.:
|
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
















ember-modal-dialog (and its ember-tether/ember-wormhole dependencies) is unmaintained and blocks upgrading consuming apps. The three places that used it now rely on browser primitives instead:
popover="manual"elements rendered in the top layer and placed next to their anchor with CSS anchor positioning (position-anchor/position-area, with@position-tryfallbacks that pin to the viewport edge or flip, like ember-tether's "pin" constraint did). Browsers that support popovers but not anchor positioning (Safari 17/18, Firefox < 147) fall back to inline top/left styles computed from the anchor's bounding box.<dialog>opened withshowModal(): the browser provides the backdrop, focus trapping, inert page content, Escape handling and (where supported) light dismiss viaclosedby="any"; a click-on-backdrop fallback covers older browsers.Behavioural fixes that came with this:
href="#"link, and the page behind the open dialog no longer scrolls.