Skip to content

Fix scrollspy reset when scrolling above the countUp #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 28, 2023

Conversation

paidge
Copy link
Contributor

@paidge paidge commented Nov 24, 2022

I'm submitting a...

[X] Bug Fix
[ ] Feature
[ ] Other (Refactoring, Added tests, Documentation, ...)

Checklist

  • Test your changes
  • Followed the build steps

Description

Fix #294

Does this PR introduce a breaking change?

[ ] Yes
[X] No

@inorganik
Copy link
Owner

Can you please resolve conflicts, then i can pull and test?

@inorganik
Copy link
Owner

You should be able to just merge master, then rebuild

@paidge
Copy link
Contributor Author

paidge commented Dec 16, 2022

I think that is ready for testing

@inorganik
Copy link
Owner

Just getting around to this, and looking at the diffs something is messed up, because it is showing my changes as additions in your PR. I could easily add your change, but I would like you to get credit for it.

Can you please try to re-merge master using the instructions here? We should only see your changes as additions.

@paidge
Copy link
Contributor Author

paidge commented Jan 26, 2023

Hi,
I re-merged master with these instructions. I solved conflicts and pushed my fork. Is it good for you ?

@inorganik
Copy link
Owner

@paidge yes except your formatting is causing whitespace changes. Please match the formatting - spaces not tabs, only 2 spaces/tab

@paidge
Copy link
Contributor Author

paidge commented Jan 26, 2023

sorry i dont understand. I ran npm run lint and GIT did not reference any difference. How could I resolve this issue ? In VS Code parameters ?

@paidge
Copy link
Contributor Author

paidge commented Jan 27, 2023

I saw that line 123 was not correctly idented. I corrected manually. Is it better ?

@inorganik
Copy link
Owner

Look at this diff and look at the indents. You are using 4-space tab indents, but the rest of the file is using 2-space indents. You've only changed line 122-125, but lines 108-129 have changes because of the whitespace. Also lines 108 and 129 have no indent, when they should have an indent. You've also added several empty lines.

Once you get it where only lines 122-125 have a change (minus the empty lines), you'll know you've fixed it.

@paidge
Copy link
Contributor Author

paidge commented Jan 27, 2023

Strange. I replaced manually tabs with spaces. This should be ok now.

@inorganik
Copy link
Owner

Look at the diff again. Still whitespace changes, because the indent for the function is gone - this should be visible as you scroll the code in your IDE. Also the empty lines still there.

Drop another comment after you've pushed, and doubled checked the diff in the "files changed" tab of this PR. It should only have green on the four lines you changed.

@paidge
Copy link
Contributor Author

paidge commented Jan 28, 2023

sry. I checked the diff and indentation should be right

@inorganik
Copy link
Owner

That'll work, thanks for sticking with it!

@inorganik inorganik merged commit e3bbc8d into inorganik:master Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScrollSpy does not reset countUp when the user scrolls back to the top of the page
2 participants