---
title: "Discussion on \"Prevent layout shift when toggling scrollbar on Window\" | Hashnode"
description: "Discussion on \"Prevent layout shift when toggling scrollbar on Window\". When will the scrollbar toggle? For example:\n\nOpen a Modal, Popup, or Drawer with a lot of content and prevent the user from scrolling the Window.\nToggle an Accordion or a Tab which expands the document height that leads to shows up the scrollbar.\n....."
url: "https://hashnode.com/posts/prevent-layout-shift-when-toggling-scrollbar-on-window/69623f088827666df4d63663"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Prevent layout shift when toggling scrollbar on Window](https://kmstech.co/blogs/prevent-layout-shift-when-toggling-scrollbar-on-window?utm_source=hashnode&utm_medium=feed)

When will the scrollbar toggle? For example: Open a Modal, Popup, or Drawer with a lot of content and prevent the user from scrolling the Window. Toggle an Accordion or a Tab which expands the document height that leads to shows up the scrollbar. .....

Jan 10 · 3 min read · kmstech.co  
Read the article

-   [#layout-shift](https://hashnode.com/tag/layout-shift)
-   [#css](https://hashnode.com/tag/css)
-   [#scrollbar](https://hashnode.com/tag/scrollbar)
-   [#tricks](https://hashnode.com/tag/tricks)
-   [#window](https://hashnode.com/tag/window)

## Written by

[KMS Tech](https://hashnode.com/@KMSTech)

@KMSTech · Dhaka, Bangladesh

  
[View profile](https://hashnode.com/@KMSTech)

Sacred Intention Leads to Perfection

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
