It wasn't a bug; I made it so that the boxes will also be grabbed if the mouse hovers over them, which makes dragging multiple boxes a lot easier.