You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

disable-body-scroll

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disable-body-scroll

Disable the scrolling of the content of the body when the content of the pop-up window is scrolled

0.1.8
latest
Source
npmnpm
Version published
Weekly downloads
25
-3.85%
Maintainers
1
Weekly downloads
 
Created
Source

disable-body-scroll

  • Disable the scrolling of the content of the body when the content of the pop-up window is scrolled
  • Please add to the Y-axis scrolling element
  • Support vue directive(vue2,vue3)
  • Support independent function call
  • demo

Project setup

npm install disable-body-scroll

export

keydescparams1params2
disabledBodyScrolldisabledBodyScroll functionscroll dom---
directivevue directive config-----

Usage

disabledBodyScroll

  • recommended to replace it with directive if you use vue
disabledBodyScroll(document.querySeletor("#modelScrollBox"));

directive

  • only work with vue
import { directive } from "disable-body-scroll";
Vue.directive("disabled-body-scroll", { ...directive });
//
<div id="modelScrollBox" v-disabled-body-scroll>
  ...
</div>
;

Q&A

  • Dynamically enable or disable the diasabledScroll

  • like v-disabled-body-scroll:[disabledScrollDirectiveStatus],variable disabledScrollDirectiveStatus is ”working“ or "disabled"

  • Adaptive horizontal screen app

  • like v-disabled-body-scroll="rotate",Variable rotate equals 0 or 90 or - 90

Keywords

disable

FAQs

Package last updated on 09 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.