Commit 456890f
authored
fix(ios): don't clear typing attributes on empty editor focus (#791)
# Summary
fixes #322
Currently, in `manageTypingAttributesWithOnlySelection:YES`, we clear
typing attributes and then apply the ones applicable to the content. We
also do that when editor's content itself is empty, but when there is no
content, there is no need to _reapply_ the typing attributes, as there
is nothing to reapply on. That also introduced a case where a user would
first set the active styles (typing attributes) programmatically, e.g.
via a toolbar, and then focus it. This would result in priorly chosen
styles to be reset, which is unintuitive and inconsistent to how it
works on both Android and Web.
## Test Plan
Follow the steps in the attached video
## Screenshots / Videos
Before:
https://github.com/user-attachments/assets/a1b6139c-3eb7-4d68-9996-f305e3a03db6
After:
https://github.com/user-attachments/assets/e94db0b8-2824-4a2c-b40b-5375b8dd1abe
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| iOS | ✅ |
| Android | ❌ |
| Web | ❌ |
## Checklist
- [ ] E2E tests are passing
- [ ] Required E2E tests have been added (if applicable)1 parent 5a733d4 commit 456890f
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
| |||
0 commit comments