esl icon indicating copy to clipboard operation
esl copied to clipboard

[🐛 in esl-footnotes]: multiple linking/unlinking during some manipulation of content containing notes

Open dshovchko opened this issue 2 years ago • 0 comments

There is a problem for the note element when it is inside content that is being manipulated for example text truncating.

During these manipulations, the element connects to DOM then disconnects. Note element trying to find Footnotes element which will link with it after connection. During disconnection, Note element brokes link with Footnotes. There can be several such cycles.

This is not optimal in terms of performance. It also distorts the order of the notes in the list. You have to sort the list after every cycle.

Current behavior After the DOM connection element immediately tries to establish a link with Footnotes.

Expected behavior After the DOM connection element must wait a while. If during this time it has not been disconnected off, then establish a connection. While waiting, it is necessary to substitute some kind of fake content (like ??) in order for the element to have a size close to the real one.

dshovchko avatar Aug 18 '21 13:08 dshovchko