/site/ - Site Meta

Official 8chan Site Meta. (Bring bug reports, complaints, and requests here)

Index Catalog Archive Bottom Refresh
Name
Options
Subject
Message

Max message length: 12000

files

Max file size: 32.00 MB

Total max file size: 50.00 MB

Max files: 5

Supported file types: GIF, JPG, PNG, WebM, OGG, and more

CAPTCHA
E-mail
Password

(used to delete files and posts)

Misc

Remember to follow the Rules

The backup domains are located at 8chan.se and 8chan.cc. TOR access can be found here, or you can access the TOR portal from the clearnet at Redchannit 3.0.

US Election Thread

8chan.moe is a hobby project with no affiliation whatsoever to the administration of any other "8chan" site, past or present.

(261.28 KB 1200x1160 Closerkitty.jpeg)

Anonymous 09/06/2022 (Tue) 15:37:25 Id: fa9b1e No. 6734
Clicking on an image expands it. Clicking it again collapses it. That is the expected behavior, so all good. However, if you click the same image again, it not only expands it, but also scrolls it to top of screen. It should not scroll to top of screen.
It's this code in thumbs.js: var expanded = link.getElementsByClassName('imgExpanded')[0]; if (expanded) { thumb.style.display = 'none'; expanded.style.display = ''; thumbs.scrollToPost(link); //THIS IS THE CODE; REMOVE THIS } else { var expanded is undefined on the first click, so it skips the condition that scrolls to the post. On the second click, it returns an element reference, so goes into the condition.


Forms
Delete
Report
Quick Reply