Commit bbe2db4
fix(ios): conflicting styles in typing attributes not correctly detected (#770)
# Summary
There was a bug which you can see in the attached video below. The issue
was that when applying `codeblock` style, we apply it to a whole
paragraph, and during this process we look for conflicting styles in the
paragraph's range. The problem is, we don't look at current typing
attributes for conflicting styles, as there is a case when:
- there is no conflicting style in the given paragraph range
- there is a conflicting style in typing attributes
The implemented fix is minimal, as I didn't want to tamper with current
logic - that's why we catch that specific case with an `if`.
I've run the e2e tests, everything passes.
## Test Plan
Reproduce the bug from the attached video, play around with toggling
different styles.
## Screenshots / Videos
Before:
https://github.com/user-attachments/assets/109cfc99-2614-422c-9f7d-3b0c058e08fe
After:
https://github.com/user-attachments/assets/c10d6d2c-ca1e-432b-a7ae-268bced9c465
## Compatibility
| OS | Implemented |
| ------- | :---------: |
| iOS | ✅ |
| Android | ❌ |
| Web | ❌ |
## Checklist
- [x] E2E tests are passing
- [ ] Required E2E tests have been added (if applicable)
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>1 parent 505a055 commit bbe2db4
1 file changed
Lines changed: 17 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
232 | 241 | | |
233 | 242 | | |
234 | 243 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
243 | 251 | | |
244 | 252 | | |
| 253 | + | |
245 | 254 | | |
246 | 255 | | |
247 | 256 | | |
| |||
0 commit comments