Skip to content
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

Implemented custom scrollToHandler. #37

Merged
merged 4 commits into from
Feb 15, 2016
Merged

Implemented custom scrollToHandler. #37

merged 4 commits into from
Feb 15, 2016

Conversation

craigsketchley
Copy link
Contributor

Haven't got a test for this. Had a bit of trouble testing the scroll position. Any thoughts on the best way to do this?

@RobbieTheWagner
Copy link
Owner

@craigsketchley I think you should be able to check scrollTop to find the scroll position. What have you tried so far?

@RobbieTheWagner
Copy link
Owner

@craigsketchley want me to give testing a go?

@craigsketchley
Copy link
Contributor Author

Hey, yeah, happy for you to have a go. I think I'm close but I'm having trouble finding a way to set the viewport size for testing. Checking if the window has scrolled to the current step element requires that some of the page is out of view. Currently when running the tests the window height and document height are the same so no scrolling occurs :(

@craigsketchley
Copy link
Contributor Author

Just pushed where I'm at so you can see my thought process.

@craigsketchley
Copy link
Contributor Author

I did see that you can specify the viewport size in PhantomJS. Any idea if we can use that?

@RobbieTheWagner
Copy link
Owner

@craigsketchley There is currently a bug that makes Phantom not work. I'll see if I can get it working with Chrome this weekend.

@RobbieTheWagner
Copy link
Owner

@craigsketchley I think the problem here is document and window and such are not necessarily just the app, they include the qunit container page, and the real container is #ember-testing-container. I just changed the tests to check that scroll is initially 0 and then > 0 after the scrollTo, which means scrolling worked. Are you good with that test? I committed it to your PR branch.

@craigsketchley
Copy link
Contributor Author

Yeah nice work. That makes sense. Your commit looks good to me.

RobbieTheWagner added a commit that referenced this pull request Feb 15, 2016
Implemented custom scrollToHandler.
@RobbieTheWagner RobbieTheWagner merged commit 5a4815f into master Feb 15, 2016
@RobbieTheWagner
Copy link
Owner

@craigsketchley got it all merged in, published version 2.0.5. Is there anything we need to document in README.md?

@craigsketchley
Copy link
Contributor Author

@rwwagner90 I don't think we need to document anything. Just a fix.

@RobbieTheWagner RobbieTheWagner deleted the scrollToFix branch July 2, 2018 16:11
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.

2 participants