i is captured from @for. Material's chip often emits removed after Enter/Space (and matChipRemove also emits removed). The second call uses the same index against the already-mutated array, so the next link is deleted too.
Repro: two chips; press Enter on the first → both URLs gone if removed also fires.
Fix: keep a single handler ((removed) only, or keyboard handlers that preventDefault/stopPropagation and do not also bind removed).
`blog-create.html` binds three remove paths on each embedded-link chip:
```html
<mat-chip-option
(removed)="removeEmbeddedLink(i)"
(keydown.enter)="removeEmbeddedLink(i)"
(keydown.space)="removeEmbeddedLink(i)"
>
<button matChipRemove ...></button>
</mat-chip-option>
```
`i` is captured from `@for`. Material's chip often emits `removed` after Enter/Space (and `matChipRemove` also emits `removed`). The second call uses the same index against the already-mutated array, so the *next* link is deleted too.
Repro: two chips; press Enter on the first → both URLs gone if `removed` also fires.
Fix: keep a single handler (`(removed)` only, or keyboard handlers that `preventDefault`/`stopPropagation` and do not also bind `removed`).
Resolved in spikersoft-angular PR #818 (merged to master). Embedded-link chips use only (removed), so Enter/Space no longer double-deletes the next link. Closing.
Resolved in spikersoft-angular [PR #818](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/818) (merged to `master`). Embedded-link chips use only `(removed)`, so Enter/Space no longer double-deletes the next link. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
blog-create.htmlbinds three remove paths on each embedded-link chip:iis captured from@for. Material's chip often emitsremovedafter Enter/Space (andmatChipRemovealso emitsremoved). The second call uses the same index against the already-mutated array, so the next link is deleted too.Repro: two chips; press Enter on the first → both URLs gone if
removedalso fires.Fix: keep a single handler (
(removed)only, or keyboard handlers thatpreventDefault/stopPropagationand do not also bindremoved).Resolved in spikersoft-angular PR #818 (merged to
master). Embedded-link chips use only(removed), so Enter/Space no longer double-deletes the next link. Closing.