Open scmccoy opened 6 years ago
@scmccoy yeah this looks like a bug to me, thanks for flagging the problem in detail :+1: - have labelled as such and will take a look at resolving this weekend.
Hi Anthony, I just had a chance to test a little more - my current work around is checking in _preventEmptyRegions function if the children length is greater than or equal to 1. (around line 8855)
placeholder = this.createPlaceholderElement(region); if(region._domElement.children.length >= 1) { // do nothing } else { region.attach(placeholder); } _results.push(region._modified = lastModified);
On the second run of the function the length is 2 and skips the region.attach(placeholder). Thoughts? I am not sure how this may affect other areas. Thank you for your time, Shane M.
Hello - I am having an issue with the Placeholder solution presented in #275. It works great except in the case of using the Undo button and having an empty element. This may be a bug. To Replicate:
My code for the createPlaceholderElement function:
My HTML:
It looks like the _preventEmptyRegions function is adding a single placeholder of the element I am clicking into here:
then adding both elements placeholders in _EditorApp.prototype.syncRegions function at this line:
I haven't figured out a solution to prevent the doubling up of elements. Any advice would be great, thanks! Shane
![pixelsnap 2018-02-14 at 17 40 57](https://user-images.githubusercontent.com/9472547/36232803-31b0793e-11b1-11e8-9810-6b090a7c3923.png)