Fix bug with horizontal scroll bar appearing in some editors.

Review Request #13209 — Created Aug. 14, 2023 and discarded

Information

Review Board
release-6.x

Reviewers

With the addition of the formatting toolbar for rich text editors, we noticed
that sometimes a horizontal grey bar would appear at the bottom of some
editors. For some reason, CodeMirror was setting their editor's overflow to
scroll, which would cause the grey scrollbar to appear. I was able to
reproduce this issue on Chrome (not on Firefox though), but was unable to
figure out why this was happening. This change fixes the bug by overriding
CodeMirror's CSS settings and forcing the overflow to always be auto.

  • Tested using all of the text input boxes on the review request page with
    various lengths of text.
  • Tested using the Add General Comment text input box and resizing the box,
    saw the overflow behaviour act the same as before.
  • Tested resizing my browser.
  • Tested in Chrome and Firefox.
Summary ID
Fix bug with horizontal scroll bar appearing in some editors.
31b3a5df44a15d2bec1b6b9b7fcc5519a3eaf250
Description From Last Updated

I think the scrollbar is a red herring. The problem was how we were injecting our own elements for the …

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    I think the scrollbar is a red herring. The problem was how we were injecting our own elements for the formatting toolbar into CodeMirror's DOM, which was resulting in layout issues in CodeMirror. I have a change that addresses the core issue.

    1. Got it, thanks for looking into it.

  3. 
      
maubin
Review request changed
Status:
Discarded