@bnidev/js-utils
    Preparing search index...

    Function unlockBodyScroll

    • Unlocks scrolling on the document body, restoring original styles.

      Restores the overflow and padding-right styles that were saved when lockBodyScroll was called, then removes the data-* state attributes.

      Does nothing if the body is not currently scroll-locked.

      Returns void

      void

      // ES Module
      import { unlockBodyScroll } from '@bnidev/js-utils'
      // CommonJS
      const { unlockBodyScroll } = require('@bnidev/js-utils')
      // Unlock scroll (e.g., when closing a modal)
      unlockBodyScroll()