the moment [A], unintentionally caused something to happen
Describes an unintended consequence triggered at the exact moment of an action.
This pattern expresses that at the precise moment you did something (A), an unintended result (B) occurred. The nuance is that the result was not planned or wished for—it happened as a sudden, accidental side effect. It's often used for physical actions like jumping, turning, or standing up, where the momentum (弾み) or timing (拍子) causes something else to happen. For example, if you trip on a step, you might drop your phone—the dropping was not intentional, just a consequence of the trip.
Both 弾みに and 拍子に are interchangeable in most cases, but 弾みに often implies a physical push or momentum, while 拍子に suggests a timing coincidence. In daily conversation, you'll hear both, but the pattern is more typical in written or narrative Japanese. It's not rude, but it's somewhat formal and literary, so in casual speech you might say ~したら、つい~ instead.