Say for example I have a sword on my bar that's at 10% durability.
Now I want to swap it with a new sword from my inventory that's at 100%.
First I click on the new sword, and it floats to show it's being moved.
Now I click on the broken sword to swap it with the new sword.
It doesn't work!
Minecraft blocks swapping of items that are of the same type.
So I do this annoying multistep process, first take the sword off the bar and move it to a temp location, move the new sword onto the bar, move the old sword back to the new sword's old position.
Being unable to swap items of the same type is a genuine bug, because the limitation provides no gameplay benefit and provides no fix to any behaviour.
Please fix it because it's inconsistent.
All actions within the UI should be reliable unless they absolutely cannot be.
Swaps should be reliable. Because they can be.