Support Forum
Support › Meta Box Group › Prevent sortable nested group being able to be moved outside of its parent.
Currently, sortable cloneable nested group can be moved outside of its parent group which most on the time is unexpected behavior and will definitely mess up meta boxes data. Also it's extremely difficult to sort cloneable nested groups inside their parent (which is also sortable cloneable group) because the drop placeholder is always outside of the parent.
Another similar issue is that sortable cloneable parent group can be moved inside of another parent group. Notice that all the groups mentioned are collapsible group. I didn't test if the issue occurs for non-collapsible group.
It would be great if these issues are fixed because with their current state, the sortable cloneable nested group feature is rendered unusable.
Below is the code for registering meta boxes:
Thanks,
An additional note is that the issues happen only to the newly cloned parent group and its children, not the first group.
Hi, I've fixed it on Github. Can you try it?
Thank you, I will try it and let you know later.
Hi Tran,
I tested it and I didn't see any difference, the issues are still there. Could you please take a look at it once more?
Have you cleared the browser cache? The fix is in JS and requires to clear cache to get the fresh version.
Yes I did clear the browser cache. Note that the issue only occurs in newly cloned group. If the issue is fixed on your side, can you inform me what your current configs of Meta Box plugins? FYI I also have MB Show Hide in use.
OK, so i tried deactivating all the other Meta Box plugins (MB Term Meta, Meta Box Conditional Logic, Meta Box Show Hide) then tested the code again and it worked. After that, I activated the other Meta Box plugins then tested for one more time and this time it worked too! So honestly I have no idea what prevented it from working right after the js fix.
However, the parent group still can be placed inside another parent group, I don't know if you did test it?
Thank you for your time, I appreciate it!
I tested it and although a parent group can't be dragged inside another parent group, there's a new issue. You now can't sort the child group because when you try to drag the child group, its whole parent group will be dragged. The issue occurs to newly cloned parent group only. Could you please take a look at it?
Thanks.
Hi, I tried that and couldn't replicate the bug. Here is what I have:
Can you try again?
OK so that was my fault, I downloaded the latest Meta Box Group but installed the older version by mistake. After reinstalling the latest version (1.2.12), the issue was gone.
Thanks you very much for your help!