New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lockPostSaving not working as expected #11809

Closed
tihomirselak opened this Issue Nov 13, 2018 · 2 comments

Comments

Projects
None yet
5 participants
@tihomirselak
Copy link

tihomirselak commented Nov 13, 2018

Describe the bug
when you dispatch lockPostSaving action on data store
wp.data.dispatch('core/editor').lockPostSaving('lockName');
and when check with
wp.data.dispatch('core/editor').lockPostSaving('lockName');
it returns true but update button only looks disabled, you can still click on it and it saves normally

To Reproduce
Steps to reproduce the behavior:

  1. dispatch action command 'wp.data.dispatch('core/editor').lockPostSaving('lockName');'
  2. Click on 'Update'

Expected behavior
Update button should not do any action,

Desktop (please complete the following information):

  • OS: Mojave
  • Browser Chrome
  • Version 70

Additional context

  • Gutenberg 4.3
@swissspidy

This comment has been minimized.

Copy link
Member

swissspidy commented Nov 13, 2018

Looking at https://github.com/WordPress/gutenberg/blob/fc034921667ee95e4befe1edd89ae69a4bd646bf/packages/editor/src/components/post-publish-button/index.js it indeed seems like this will only set aria-disabled to true but not affect the onClick handlers.

@ocean90

This comment has been minimized.

Copy link
Member

ocean90 commented Nov 13, 2018

Related PR with a fix: #11760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment