Ghost/ghost/admin/app/components/editor-labs/publish-management.hbs
Kevin Ansfield 5d839a4725 Added Ctrl/Cmd+Shift+P shortcut for starting publish flow
refs https://github.com/TryGhost/Team/issues/1542

With the old publish menu flow the `Ctrl/Cmd+Shift+P` would immediately publish without showing any of the publish options which isn't ideal. For the redesign we'd like to try showing the publish flow modal instead.

- added key handler for the shortcut to the publish-flow triggering button
- added `ignoreBackdropClick` option to the publish flow modal and support for it in our modal backdrop click handler
  - the shortcut simulates a click on the button which when the modal is open equates to a backdrop click meaning repeated presses of the Cmd+Shift+P shortcut resulted in glitchy modal open/close behaviour
2022-04-21 11:33:52 +01:00

9 lines
229 B
Handlebars

<button
type="button"
class="gh-btn gh-btn-editor green gh-publishmenu-trigger"
{{on "click" this.openPublishFlow}}
{{on-key "cmd+shift+p"}}
data-test-button="publish-flow"
>
<span>Publish</span>
</button>