Closed Velin92 closed 7 months ago
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication
Attention: 3 lines
in your changes are missing coverage. Please review.
Comparison is base (
91fae40
) 87.39% compared to head (200c096
) 89.49%.
Files | Patch % | Lines |
---|---|---|
...mponents/WysiwygComposerView/WysiwygTextView.swift | 60.00% | 2 Missing :warning: |
...ents/WysiwygComposerView/WysiwygComposerView.swift | 83.33% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The issue with the current KeyCommandsHandler, is that even if the key command is set to be false, the command is not really ignored and was stll being handled by the default function, which at the same time was not working properly with plain text mode since it forced an update in the model.
Also the usage of the enter() function was redundant also for the RTE mode, since we already handle the enter directly in the replaceText properly, and we are constraining the usage of the key commands only to the ones we have defined in the library not giving to the users of the library a proper control on which and when they should be and should enabled.
The alternative approach was to disabled the default handling in plain text mode for such commands, but this created two issues:
The current solution allows full control and customisation for the key commands while also providing the possibility of creating some default rapid key commands (like .enter) for the general use cases, while also fixing the shift+enter bug in plain text mode.