mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Independent technology for modern publishing, memberships, subscriptions and newsletters.
bloggingcmscreator-economyghosthacktoberfestheadless-cmsjamstackjavascriptjournalismnodejspublishingweb-application
refs https://github.com/TryGhost/Team/issues/559 Click-to-close and escape-to-close functionality in `ember-promise-modals` was deferred to `focus-trap`. For some of our use-cases that wasn't ideal because there was nowhere to hook in if we wanted to abort modal closing for any reason (eg, to show an unsaved changes confirmation) - bumped the custom fork version of `ember-promise-modals` to allow all focus-trap close-inducing behaviour to be disabled - also adds a `beforeClose()` option when opening modals for future use - changed modals service options that are passed through to `focus-trap` so that all close-inducing behaviour is disabled - when the first modal is opened add event handlers for clicks and <kbd>Escape</kbd> key presses that should close modals and manually call `.close()` on the top-most modal in the stack - remove event handlers when the last modal is removed |
||
---|---|---|
ghost/admin |