When Decoration.inline wrap a inline node

I have a link type defined by node schema not mark, when i create a selection and use Decoration.inline wrap the selection from text node to link node with class attr , it will create classname both at a label and span label, what i expect is that classname show at span label only

WX20200713-154655@2x

however, if i select from right to left, it looks good

WX20200713-155816@2x

why is there such a difference?

Does this patch help with this? I didn’t try to reproduce your setup, but applying the styles to multiple levels is something that I didn’t intend to happen.