fastmail / Squire

The rich text editor for arbitrary HTML.
MIT License
4.75k stars 406 forks source link

The purpose of the `while` loop in the `fixCursor` function is unclear #449

Closed SergeyMosin closed 7 months ago

SergeyMosin commented 9 months ago

https://github.com/fastmail/Squire/blob/8bee51683b723e000f477009ed4337716a7b80ba/dist/squire-raw.js#L451-L466 The while loop on line 456 only modifies the scoped parent and child vars which are not used anywhere else.

Is this loop there to create the cache ? As per line 152 here: https://github.com/fastmail/Squire/blob/8bee51683b723e000f477009ed4337716a7b80ba/dist/squire-raw.js#L151-L153

Thank you