Horizontal scroll bar obstructs last line of text after Paste in FireFox #3821

SusanDoan opened this Issue Feb 11, 2016 · 3 comments


None yet

2 participants


Steps to Repro:

  1. Use FireFox (Chrome does not repro)
  2. Go to https://codemirror.net/demo/fullscreen.html
  3. Delete all text in the editor
  4. Enter a bunch of text so the vertical scroll bar appears, but NOT the horizontal scroll bar, and also make sure there is no new line at the bottom of the editor.
  5. PASTE text (to any line but the last) to cause the horzontal scroll bar to appear

=> scroll to the bottom left of the editor and notice the horizontal scrollbar is partially obstructing the last line of text


marijnh commented Feb 17, 2016

I am not able to reproduce this. Here's concretely how I'm following your instructions:

  • Open the fullscreen demo.
  • Select all content of the editor, press ctrl-x to cut
  • Spam letter keys until there line is long enough to cause a horizontal scrollbar
  • Move to the middle of the the line (or don't, both cause the same outcome)
  • Press ctrl-v to paste

The cursor now moves to the end of the pasted content, near the bottom of the document, and the last line is visible, above the horizontal scrollbar. If I add a few extra lines so that pasting doesn't put the cursor on the last line, the problem still does not show itself.

This is Firefox 44 Linux. Which OS are you testing on?


Thanks for getting back to me!

I see this on Firefox 43.0.1, Windows 7 and Firefox 41.0.2, Mac OSX Yosemite.

I think you went wrong on step 4 - you should spam letter keys until the Vertical scrollbar appears.

marijnh commented Feb 19, 2016

Ah, sorry for the poor reading. Looks like a bug (or at least strangeness) in Firefox's interpretation of a padding I'm setting. Attached patch seems to work around it. Does it help?

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