I am trying to find the solution for a delete problem that I am facing in iOS/UIWebView while deleting a custom html element which is having its contenteditable attribute overridden to false, while its parent is a div tag with contenteditable value set as true.
<div id="editable" contenteditable="true>
<mycustomtag id="uuid1" contenteditable="false"> .... </mycustomtag><br>
<mycustomtag id="uuid2" contenteditable="false"> .... </mycustomtag><br>
<mycustomtag id="uuid3" contenteditable="false"> .... </mycustomtag><br>
</div>
I wish to delete one of the mycustomtag elements within the div tag, by placing the caret next to it. But, when I delete the last custom tag with uuid3, ALL of the mycustomtag elements are getting deleted, instead of just one. I don't see any valid reason of why this is happening.
I referred to this link : How to delete an HTML element inside a div with attribute contentEditable? where similar problem is been addressed, but this does not seem to be solving my problem. Any help ?