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

[EditableText] Add extra code to make sure we move scroll position to the end #1796

Merged
merged 1 commit into from Nov 8, 2017

Conversation

gscshoyru
Copy link
Contributor

Fixes #1761

Changes proposed in this pull request:

Set scrollLeft as well as selection position to guarentee that the scroll is correct.

Reviewers should focus on:

I tried, repeatedly, to figure out why setSelectionRange doesn't seem to work properly, for us, in chrome. I... had a lot of trouble playing with it to get it to do it programmatically in any browser. Even using existing examples.

This method of doing it works in chrome, and other browsers, and will make sure we're scrolled to the end when we need to be.

@blueprint-bot
Copy link

Add extra code to make sure we move scroll position to the end

Preview: documentation
Coverage: core | datetime

@cmslewis
Copy link
Contributor

cmslewis commented Nov 7, 2017

Can you post a GIF or add a test?

EDIT: and/or*

@gscshoyru
Copy link
Contributor Author

GIF:

nov-07-2017 16-13-19

I'm not sure how one would go about testing this, exactly -- other than checking that scrollLeft equals scrollWidth which would be pretty much just testing that javascript works.

@tgreenwatts
Copy link
Contributor

Looks like it works for me! Chrome & FF

@cmslewis cmslewis merged commit 34fd9a4 into master Nov 8, 2017
@cmslewis cmslewis deleted the gsc/editable-text-scroll-to-end branch November 8, 2017 21:28
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.

None yet

5 participants