Minecraft wiki entry for Inventory, associated text: While an item stack is grabbed, dragging items around with the left mouse button divides the stack equally over the dragged-over slots (with the remainder staying on the cursor), while dragging item stacks around with the right mouse button places one of that stack in each dragged-over slot. Regardless of which mouse button is used (left or right), this occurs only if the slot is empty or contains the same item being dragged.