Open tipa opened 3 years ago
Hi there, first of all thanks for the great bug report, do you want to submit a PR for the fix? I will review it and approve it if all goes well. It will also be great to add unit test for this specific crash in order to prevent future regressions.
In my fork, I disabled html pasting, which causes a crash when the user tries to copy-paste lists. This is because Aztec might encode a nil-int when performing the
copy
: https://github.com/wordpress-mobile/AztecEditor-iOS/blob/e0cb3c96ada0bed9fab5d3e93952e8375b29d97e/Aztec/Classes/TextKit/ParagraphProperty/TextList.swift#L83Now, when
pasting
, a crash occurs here because it expects a non-nil-int: https://github.com/wordpress-mobile/AztecEditor-iOS/blob/e0cb3c96ada0bed9fab5d3e93952e8375b29d97e/Aztec/Classes/TextKit/ParagraphProperty/TextList.swift#L64This can be fixed by changing that line to: