Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

🐛 fix Cmd-S save with cursor in slug field #738

Merged
merged 1 commit into from
Jun 15, 2017

Conversation

kevinansfield
Copy link
Collaborator

closes TryGhost/Ghost#8551

  • move updateSlug logic from gh-post-settings-menu component to editor-base-controller mixin
  • put updateSlug and save into a task group so that concurrent calls are queued - means that pressing Cmd-S with the cursor still in the slug field will first trigger the updateSlug call (triggered by the field blur) then trigger the save call (triggered by Cmd-S) when updateSlug has finished so there are no conflicts and you still see the "saved" notification

closes TryGhost/Ghost#8551
- move `updateSlug` logic from `gh-post-settings-menu` component to `editor-base-controller` mixin
- put `updateSlug` and `save` into a task group so that concurrent calls are queued - means that pressing Cmd-S with the cursor still in the slug field will first trigger the `updateSlug` call (triggered by the field blur) then trigger the `save` call (triggered by Cmd-S) when `updateSlug` has finished so there are no conflicts and you still see the "saved" notification
@coveralls
Copy link

Coverage Status

Coverage remained the same at 73.069% when pulling baac2db on kevinansfield:fix-psm-cmd-s into 25bfa20 on TryGhost:master.

Copy link
Member

@cobbspur cobbspur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested LGTM

@cobbspur cobbspur merged commit 6f23f16 into TryGhost:master Jun 15, 2017
@kevinansfield kevinansfield deleted the fix-psm-cmd-s branch February 20, 2018 11:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants