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

[BUG] Can't move container with content #255

Open
kionez opened this issue Mar 24, 2021 · 2 comments
Open

[BUG] Can't move container with content #255

kionez opened this issue Mar 24, 2021 · 2 comments
Labels

Comments

@kionez
Copy link

kionez commented Mar 24, 2021

I noticed a ugly bug, also tested in official example with Firefox 87.0 and Chrome 89.

If I use a container with component content (i.e.: "Featured article"), I can't move it anywhere.
If I put a component after a container with component, when I try to move it I can't restore his placement.

Here is a short video done on the official example.

@kionez kionez added the bug label Mar 24, 2021
@kionez
Copy link
Author

kionez commented Mar 26, 2021

I'm testing a fix changing src/keditor/container/initContainerContent.js, from:

        items: `> .${CSS_CLASS.COMPONENT}`,
        connectWith: `.${CSS_CLASS.CONTAINER_CONTENT_INNER}`,

to:

        items: `> .${CSS_CLASS.COMPONENT}, > .${CSS_CLASS.SUB_CONTAINER}`,
        connectWith: `.${CSS_CLASS.CONTAINER_CONTENT_INNER}, .${CSS_CLASS.CONTENT_AREA}`,

It seems working, but I don't have the knowledge to understand if it has other consequences

@kionez
Copy link
Author

kionez commented Mar 31, 2021

I'm testing a fix to avoid too many nested container, addig in src/keditor/container/initContainerContent.js, in the receive function (line 46):

            let target = $(this);
            if (target.parents(`.${CSS_CLASS.CONTAINER_CONTENT_INNER}`).length >= 1) {
                $(ui.sender).sortable("cancel");
                return false;
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant