While working on creating a website, I came across a great template and decided to use it as inspiration. You can check out the template here. However, during the process, I encountered a common UI bug. When a user scrolls down the page, clicks on the "X" of an image to view it in fullscreen mode, toggles back, then scrolls back up to the top of the page, the previously visible content disappears even though it's still in the DOM. I examined the JavaScript function for the toggle feature and found it to be simple and effective, but it seems to encounter issues when scrolling on the webpage. Check out the screenshot of the bug here.