Skip to content

Conversation

@DanielHeath
Copy link

I've broken my work into four logically separate commits for easy review.

The test harness renders a sequence of iframes with different setups. I found it invaluable when comparing behavior across browsers.

Adding support for overriding browser builtins made comparative testing much easier. I also plan to use it in my application because firefox's implementation has bugs.

Renaming shouldBailOut to scrollIsInstant makes the block: end stuff read much better.

The final change actually implements the block: 'end' scroll behavior.

@DanielHeath DanielHeath changed the title Support {block: 'end'} [wip] Support {block: 'end'} Sep 21, 2016
@DanielHeath
Copy link
Author

This isn't quite right yet - there's an issue I'm still trying to track down - but I'd be surprised if the final implementation was very different.

@DanielHeath
Copy link
Author

The recursive call to scrollIntoView isn't going to play nicely with scrolling to an element at the middle of a very long scrollable parent. Will have to rethink 71ac7f6 with that in mind.

@DanielHeath DanielHeath changed the title [wip] Support {block: 'end'} Support {block: 'end'} Sep 21, 2016
@DanielHeath
Copy link
Author

OK, figured it out.

I suspect this didn't (and still doesn't) work if you nest scrollable elements arbitrarily deep, but that's a terrible UX anyways and practically nobody does it.

@DanielHeath DanielHeath mentioned this pull request Oct 20, 2016
@iamdustan
Copy link
Owner

oh dang. This looks solid, @DanielHeath. Sorry for neglecting it for so long. Would you be alright picking this back up after #54 lands? I’ll get you a proper review then if you’re game.

@DanielHeath
Copy link
Author

I'm about to go on paternity leave (woot) so probably won't be about much.

There's a bug on chrome >= 56 that stops it cleaning up after itself properly - after scrolling to something it breaks further attempts to scroll. Haven't had time to investigate yet.

@iamdustan
Copy link
Owner

Oh awesome! Congratulations, @DanielHeath! Enjoy dadmode! 😄

@iamdustan iamdustan self-assigned this Mar 2, 2017
@iamdustan iamdustan mentioned this pull request Apr 17, 2017
@pmyagkov
Copy link

pmyagkov commented Oct 31, 2017

@iamdustan @DanielHeath guys, could you actualise this PR and merge it? It's a crucial feature for me to use.

UPD: I created a PR #88 based on the most recent master and this PR with { block: 'end' } support. Could you please merge it and bump a version?

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.

3 participants