Quill: Inserting new lines with `height: auto` container does not scroll added line into view

Created on 10 Mar 2017  路  10Comments  路  Source: quilljs/quill

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

bug

All 10 comments

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

@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

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

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

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

scrollingContainer: 'body', 

version 1.2.3

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

@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?

There are relevant CSS rules in the example that are necessary

@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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kayahr picture kayahr  路  42Comments

tkw722 picture tkw722  路  32Comments

jasongisstl picture jasongisstl  路  33Comments

SqweeeRyan picture SqweeeRyan  路  29Comments

EmilStenstrom picture EmilStenstrom  路  59Comments