Hello, I have a set of decorations and I’m trying to remove a single decoration. When I remove a single decoration, it seems to remove all of the decorations from the parent paragraph node. Here is a remix link where I was able to reproduce the issue based on the linting example with the widgets removed so it’s just inline decorations. There are three paragraphs, with one decoration in each of the first two paragraphs, and then three decorations in the last paragraph. I just put a breakpoint on L91, and then in the console typed:
decorationSet = decorationSet = view.state.plugin$ decorationSet.remove([decorationSet.find()]).find()
It returned a decorationSet with just the first two decorations. The same happens if I try deleting the fourth and fifth decorations. If I do the same thing with either of the first 2 decorations, those are each only deleted as expected. Is this behavior normal, or am I simply using this remove function incorrectly? I found that adding a unique identifier on the spec of each decoration (like it’s from pos or some id) fixed this behavior. Thank you!