0

When I'm adding my custom block and then trying to edit it in "Edit as HTML" mode, any changes reset to the previous state every time when I click outside the editing window. Let say default HTML in my block is <div class="wp-block-my-custom-video-box"></div>, if I make some changes, let say <div class="wp-block-my-custom-video-box">some text</div> some text will disappear. This issue related to WordPress ver. 5.3.2, with ver. 5.2.5 everything works fine. Help me figure out, please, what can cause such strange behavior? enter image description here

this is a simplified example of the component: https://pastebin.com/RqQP0LCM

  • Does this only affect your block, or all blocks? – Jacob Peattie Jan 22 at 13:31
  • Are there any JS errors in the console? – WebElaine Jan 22 at 14:13
  • Yes, it affects only my block, but I can't find what part may do it. – Eugene Lavrinenkov Jan 22 at 14:17
  • No, there are no JS errors in the console. – Eugene Lavrinenkov Jan 22 at 14:18
  • I added an example of the code – Eugene Lavrinenkov Jan 24 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.