We can limit the panning/zoom of the map into a region defined on the maxbounds coordinates, forcing the map to stay on the specified portion of map and not allowing going out of there.
You can see a standalone example of this code here.