Skip to content

In Gutenberg Editor, the cursor jumps to the start of the block every time when auto saving #1202

@manzoorwanijk

Description

@manzoorwanijk

Expected Behavior:

When a post is autosaved, the cursor should not dislocate

Actual Behavior:

The cursor jumps to the start of the block every time when auto saving

Steps to reproduce :

  1. Activate CMB2 and use Gutenberg editor to create a post.
  2. Start wring into a block and wait to it to be auto saved.
  3. Watch the cursor as it jumps to the start of the block.

What is causing this?

Possibly #1190 introduced this issue. It took me a few hours to debug the issue and finally caught it red handed on cmb2.js#L130 😄. When you comment out that line, there is no such issue.
PS: keep SCRIPT_DEBUG enabled

Debug Info

WP 5.0.2
CMB2 2.5.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions