Title: insertBlock() function in 5.6.x
Last modified: March 10, 2021

---

# insertBlock() function in 5.6.x

 *  [Meyer Auslander](https://wordpress.org/support/users/meyerauslander/)
 * (@meyerauslander)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/insertblock-function-in-5-6-x/)
 * The [insertBlock()](https://developer.wordpress.org/block-editor/reference-guides/data/data-core-block-editor/#insertBlock)
   Gutenberg JS function does not seem to be working as it did in WordPress version
   5.5.3. On version 5.6.x, innerBlocks[] does not always reflect the insertion 
   of the new block. Did anything change that would impact the results if the insertBlock
   function. Tried using wp.data.dispatch( ‘core/block-editor’ ).insertBlocks instead,
   but it had the same problem.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [nathan888](https://wordpress.org/support/users/nathan888/)
 * (@nathan888)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/insertblock-function-in-5-6-x/#post-14266412)
 * Hey there I don’t have an answer but did you solve this. I’m noticing a lot of
   breaking chances in 5.6 for gutenberg.
 * I’ve built a custom block generator and the block tool bar, for re-arranging 
   blocks apply bold styles etc. Is no longer clickable. Reverting 5.5.3 fixes all
   of these issues. I’m going to create a separate ticket referencing this one as
   well
 *  [nathan888](https://wordpress.org/support/users/nathan888/)
 * (@nathan888)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/insertblock-function-in-5-6-x/#post-14305274)
 * So I ran through this list, created a new environment as well no luck. I did 
   find this warning when I click on a block for the first time. Any suggestions?
 * block-editor.min.js?ver=7bc2f41a2f2e0da426f12f29b2139cae:12 [Violation] Added
   non-passive event listener to a scroll-blocking ‘touchstart’ event. Consider 
   marking event handler as ‘passive’ to make the page more responsive. See [https://www.chromestatus.com/feature/5745543795965952](https://www.chromestatus.com/feature/5745543795965952)
 *  [nathan888](https://wordpress.org/support/users/nathan888/)
 * (@nathan888)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/insertblock-function-in-5-6-x/#post-14339319)
 * Possible solution, it fixed my environment. I’d try using this github as a starter.
   It has a different component tree and it solved my problems. Just try slotting
   your code into it
 * [https://github.com/getdave/standalone-block-editor](https://github.com/getdave/standalone-block-editor)
 *  [meyertreestone](https://wordpress.org/support/users/meyertreestone/)
 * (@meyertreestone)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/insertblock-function-in-5-6-x/#post-14341715)
 * [@nathan888](https://wordpress.org/support/users/nathan888/), I’m not looking
   for a solution that changes WordPress to comply with my code but rather a solution
   that makes my code comply with WordPress.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘insertBlock() function in 5.6.x’ is closed to new replies.

## Tags

 * [js](https://wordpress.org/support/topic-tag/js/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [meyertreestone](https://wordpress.org/support/users/meyertreestone/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/insertblock-function-in-5-6-x/#post-14341715)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
