MouseJoint Bounding Box?

Is there any possible way to make it so a MouseJoint will only move within a certain region? Such that if you you drag the object past the boundary the object sticks to it, not such that the joint is actually broken. This way you can drag an object around within a certain area. Should I instead just have an invisible object that is attached to the mouse via SetXForm, and distance joint the dragged object to this invisible object?

EDIT: Actually, SetXForm will break the distance joint, won't it?
It should be relatively easy to clamp the position of the mouse, since you have to pass the coordinates into the mouse joint anyway. Or do you want the object to actually react as if it slams up against a wall?
Oh >.< Completely forgot that the mousejoint had to be fed the target. well this should make things easier.

Original thread: https://box2d.org/forum/viewtopic.php?t=2988