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

Inserting new lines with height: auto container does not scroll added line into view #1361

Closed
artaommahe opened this issue Mar 10, 2017 · 10 comments

Comments

@artaommahe
Copy link

artaommahe commented Mar 10, 2017

Quill does not handle autoscroll on new lines if container has height: 100% and window should be scrolled instead of container.

Steps for Reproduction

  1. Visit http://codepen.io/anon/pen/NppeBv
  2. Add many new lines

Expected behavior:
When new line added out of view Quill should autoscroll to it

Actual behavior:
New lines added out of view

Version: 1.2.2

@jhchen
Copy link
Member

jhchen commented Mar 13, 2017

Autoscrolling involves a bit more setup unfortunately to work reliably across browsers. An example is here.

@jhchen jhchen closed this as completed Mar 13, 2017
@artaommahe
Copy link
Author

artaommahe commented Mar 13, 2017

@jhchen that example has same issue - place cursor at any line and press enter many times. New lines below viewport will not trigger autoscroll to them

@jhchen
Copy link
Member

jhchen commented Mar 13, 2017

Yes you are right it seems to have broken since I last remember. Thanks for the report.

@jhchen
Copy link
Member

jhchen commented Mar 29, 2017

The autogrowing example is now working so if you adjust your codepen similarly and use 1.2.3 it should now be resolved.

@artaommahe
Copy link
Author

@jhchen still does not work with scroll on body
http://codepen.io/anon/pen/MpLBwo

scrollingContainer: 'body', 

version 1.2.3

@jhchen
Copy link
Member

jhchen commented Apr 3, 2017

Now my previous comment that more setup is involved and that the autoscroll example should be helpful is accurate.

@artaommahe
Copy link
Author

@jhchen what do mean by more setup? if i replace scrollingContainer: '#scrolling-container' with body in autogrowing example than autoscroll on new lines does not work. Does it mean that autoscroll for body should be handled somehow manually or what did i miss?

@jhchen
Copy link
Member

jhchen commented Apr 4, 2017

There are relevant CSS rules in the example that are necessary

@daau
Copy link

daau commented May 6, 2017

@jhchen It looks like people are having issues because they're enclosing the example HTML code within another div, without updating the "scrollable-container" id.

@artaommahe
Copy link
Author

@dakmau just look at http://codepen.io/anon/pen/MpLBwo ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants