In this work, we investigate the dynamics of plasma blobs in the edge of magnetic confinement devices using a full-f gyrokinetic particle-in-cell code with X-point geometry. In simulations, the evolution of a seeded blob is followed as it approaches a naturally-forming zonal shear layer near the separatrix, where the blob is stabilized by a large spin induced by the self-consistent adiabatic electron response, and blob bifurcation and trapping are observed during the cross-field propagation of blobs. A new theoretical explanation in both the zonal free and zonal shear layer is constructed, where the dominant Ε×Β spin motion is included. A theoretical condition for a transport barrier induced by the interaction between spinning blobs and the zonal shear layer is obtained, and its scaling is verified with simulations. The new theoretical framework, especially the transport barrier, is applicable to explain and predict various experimental phenomena. In particular, the transport barrier condition calculated with experimental parameters demonstrates that the blob radial transport for H mode is smaller than L mode in experiments.