firepad icon indicating copy to clipboard operation
firepad copied to clipboard

rich text: not enough lines are rendered to fill viewport

Open cben opened this issue 10 years ago • 2 comments

I'm initializing a new rich text pad via setText with many long lines: https://github.com/cben/firepad/commit/7a43c0e32110650d92f7771c9c55d80bb4644620 => https://rawgit.com/cben/firepad/patch-2/examples/richtext.html

For come reason codemirror doesn't render enough lines to cover the viewport: screenshot (live on browserling) Scrolling renders new lines but again not enough, some amount of whitespace remains at the bottom.

This is reproducible on many platforms: http://app.crossbrowsertesting.com/public/i866dfd0fa0b9da1/screenshots/z3968faf6b95c6002e80?size=small&type=windowed (shots of codepen.io/cben/pen/EjbyOj, slightly different but same firepad initalization)

It's not purely a codemirror issue, it somehow depends on firepad initialization. There is no or almost no problem when I load an existing pad with the same content: https://rawgit.com/cben/firepad/patch-2/examples/richtext.html#-JsjqWAv-fuBlrEBb-dT (on my ubuntu chromium it does load partially rendered but becomes completely OK as soon as I touch the scroll wheel; and on services like crossbrowsertesting it seems entirely OK...)

cben avatar Jun 26 '15 13:06 cben

Weird! Not sure what would cause that. If scrolling fixes it, I do suspect the root cause is something in CodeMirror though I guess firepad is exacerbating it somehow. If you can create a CodeMirror-only repro, the CodeMirror folks could hopefully dig into it.

mikelehen avatar Jun 26 '15 16:06 mikelehen

Ben is it possible for you to post on the codemirror list ? thank you!

kofifus avatar Jun 27 '15 00:06 kofifus