@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
5 lines (4 loc) • 740 B
JavaScript
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
v3.2.1 */
import{a as r}from"./CKRTMNFR.js";var n=0,u="",f=()=>{function t(){n++,n===1&&(u=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden")}function o(){n--,n===0&&(document.documentElement.style.overflow=u)}return r((e,l)=>{l.onConnected(()=>{e.opened&&e.preventDocumentScroll&&t()}),l.onUpdate(d=>{e.hasUpdated&&(d.has("opened")&&e.preventDocumentScroll?e.opened?t():o():d.has("preventDocumentScroll")&&e.opened&&(e.preventDocumentScroll?t():o()))}),l.onDisconnected(()=>{e.opened&&e.preventDocumentScroll&&o()})})};export{f as a};