• Resolved aidw96

    (@aidw96)


    I have created a list block in the block editor as shown below, but when I delete the child elements and reload the browser, the child elements that should have been deleted are still there.

    1 Add a child element in a list block

    • input text
    • input text
      • input text child

    2 remove a child element

    • input text
    • input text

    3 publish

    4 Browser reload

    • input text
    • input text

    After 4, the deleted child element appears.
    The input text is gone, but the input field is restored.

    Is this a bug?
    In wordpress 6.1 I see that the list block has changed, is that an effect?

    If you look in the inspector, you’ll see that
    2, it appears that the empty ul tag is still there after the deletion.
    Is this the cause of the problem? Shouldn’t the ul tags essentially disappear with the delete action?

    Create a custom block and add it to
    core/list
    core/list-item
    and also in InnerBlocks specifying The same phenomenon is occurring.

    I also tried deleting the browser cache,
    and I am also trying it in the incognito window of google chrome.
    I have tried plugins that can clear the cache, but the situation has not changed.

    I have tried the plugin that can clear the cache, but it doesn’t change the situation.
    After publishing, I went to the W3 Total Cache page and cleared the cache without reloading the page.
    I went to the W3 Total Cache page, cleared the cache, and moved to the article page again, but the same phenomenon occurred.

    But the situation remains the same. But I don’t want to delete the cache in the operation.

    use WordPress 6.1.1
    use theme Twenty Twenty-Three ver: 1.0
    use google chrome latest version(ver:110.0.5481.100)

    I tried it with Twenty Twenty-Three, as it occurred with the original theme I created.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter aidw96

    (@aidw96)

    If you post with the editor you used for the question above, you’ll see
    ?input text
    ?input text
    ?input text child
    This appears to be on the same level as the question above, but it is not the actual question.
    The actual question is about submitting a list in a hierarchical manner.

    1 Add a child element in a list block

    <ul>
    <li>input text<li>
    <li>input text
    <ul>
    <li>input text child</li>
    </ul>
    </li>
    </ul>

    (I mean hierarchically structured.)
    This is what I did.And now we have a problem.

    • This reply was modified 1 year, 9 months ago by aidw96.
    • This reply was modified 1 year, 9 months ago by aidw96.
    Moderator bcworkz

    (@bcworkz)

    I think you are saying that you removed something from a list but there remains unwanted remnant HTML after removal. Is that the gist of it?

    I think I know what’s going on. It’s an issue I’ve seen in multiple WYSIWYG editors. When you select something for removal, there’s associated HTML that should be included. But you cannot see the underlying HTML to accurately make a selection and where the editor places your selection among the surrounding HTML is unpredictable. Thus when you delete the selection there can be remnant HTML that should have been removed but has not.

    I don’t know what a proper solution would be. It’s an old, persistent issue with WYSIWYG editors. The workaround is to go into code editor or text mode and do the removal from there, ensuring you accurately remove associated HTML along with the content you want removed.

    Thread Starter aidw96

    (@aidw96)

    @bcworkz
    Thanks for the reply.

    There’s still some unwanted leftover HTML, it’s true, but
    I’d like to solve that, rather than

    1 The saved state before reloading
    2 After reloading (or after saving and moving to the submission screen again)

    In 1 and 2.
    I would like to say that the fact that the input contents have changed is a problem in terms of operation (not a function of the CMS).

    This means that after 2, if you refresh the post without inputting anything, child elements that should have been deleted will be restored in a half-empty state.

    It is not about WSYWIG.
    (although they may be related in some ways)
    I want to say that I have a problem with Gutenberg, the block editor, and
    I think there is a glitch in Gutenberg’s list block core/list core/list-item and block editor.

    • This reply was modified 1 year, 9 months ago by aidw96.
    Moderator bcworkz

    (@bcworkz)

    If you like, you can raise an issue at Gutenberg’s GitHub site. (free registration required) Please do a search prior to posting, someone may have already raised the issue. It would be very helpful if you can provide step by step instruction on how to reproduce the problem. Thanks for helping to improve Gutenberg.

    Thread Starter aidw96

    (@aidw96)

    It seems to have been a bug in google chrome.
    110.0.5481.100 (Official Build) (arm64)
    Is it fixed in I was able to confirm that it does not reproduce.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘In list block, added child elements remain’ is closed to new replies.