Skip to content
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

Template: Blocks shouldn't be draggable if template is locked #7191

Closed
Soean opened this issue Jun 6, 2018 · 0 comments
Closed

Template: Blocks shouldn't be draggable if template is locked #7191

Soean opened this issue Jun 6, 2018 · 0 comments
Assignees
Labels
[Feature] Templates API Related to API powering block template functionality in the Site Editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@Soean
Copy link
Member

Soean commented Jun 6, 2018

Describe the bug
I created a template for an custom post type. If I add 'template_lock' => 'all' I still see the grab cursor and can drag the block. I am not able to drop and change the position. But i shouldn't be able to start to drag.

To Reproduce
Example Template:

function myplugin_register_book_post_type() {
    $args = array(
        'public' => true,
        'label'  => 'Books',
        'show_in_rest' => true,
        'template_lock' => 'all',
        'template' => array(
            array( 'core/image', array( 'layout' => 'column-1' ) ),
            array( 'core/paragraph'),
        ),
    );
    register_post_type( 'book', $args );
}
add_action( 'init', 'myplugin_register_book_post_type' );

Screenshots
bildschirmfoto 2018-06-06 um 22 35 24

@Soean Soean added [Type] Bug An existing feature does not function as intended [Feature] Templates API Related to API powering block template functionality in the Site Editor labels Jun 6, 2018
@jorgefilipecosta jorgefilipecosta self-assigned this Jun 8, 2018
@jorgefilipecosta jorgefilipecosta added the [Status] In Progress Tracking issues with work in progress label Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Templates API Related to API powering block template functionality in the Site Editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants