textures1245 / csmju-comcamp-22nd-promote

ComCamp 22nd for Computer Science Maejo University promote project.
https://comcamp.csmju.com/
0 stars 1 forks source link

Hotfix: fix scrolling bug in main page #12

Closed moking55 closed 11 months ago

moking55 commented 11 months ago

This pull request fixes a bug that was causing the scrolling to jump when the page loaded. The bug was caused by the #about-comcamp-section element being included in the ref array in data.ts. This pull request removes the #about-comcamp-section element from the ref array and sets the yValue to 0.

Changes:

data.ts:

This pull request has been tested manually and the scrolling bug has been fixed.

vercel[bot] commented 11 months ago

Someone is attempting to deploy a commit to a Personal Account owned by @textures1245 on Vercel.

@textures1245 first needs to authorize it.

textures1245 commented 11 months ago

Thank you for submitting this pull request to address the scrolling bug on the main page. I appreciate you taking the time to identify and fix this issue.

I reviewed the changes you proposed in data.ts, specifically removing the #about-comcamp-section element from the ref array and setting the yValue to 0. While your approach aimed to resolve the scrolling issue, upon testing, it didn't fully address the problem as I want expected to be.

However, your pull request prompted me to investigate the issue further, and I identified that the root cause of the bug lay in the element ID used for navigation. The ID should not have the '#' prefix included. After removing the '#' prefix from the target ID, the scrolling issue was resolved.

I tested these changes thoroughly to ensure that they resolved the issue and did not introduce any new bugs. And already committed this to the 8d520e2 commit version.

Thank you for your contribution to identifying and resolving this bug. Your efforts have helped improve the user experience on the main page.