Sorry for the inconvenience caused.
Query1: -Element3 is "dragged to child of element1" and when debugging I think reason is that _insertAsChild is never returned to false, also even if drag & drop is left click only up is still handled also with right click (but of course you know better your under hood...).
Solution: We were able to reproduce the reported issue and logged an issue report regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website for further updates.
Please let us know if you have any other query.
Query2: When element3 is dragged under element1 its parentId is updated and childMapping too even if I have not mapping it.
Solution: The childMapping record is updated only at the load of TreeGrid widget, but after a row drag and drop we update only the ‘childRecords’ of the parent record, whereas ‘childMapping’ is not updated for any row drag and drop. So we recommend you to use the childRecords in the record collection to track the child records in that parent item instead of “childMapping”.
Sorry about the inconvenience caused.
We were able to reproduce the issues reported by you. We have also logged an issue report and working on this issue with high priority. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
Please let us know if you require further assistance on this.