brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Inline editor background doesn't extend all the way to right when scrolling #1224

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by peterflynn Thursday Jul 12, 2012 at 19:51 GMT Originally opened as https://github.com/adobe/brackets/issues/1240


  1. Open the "citrus completed" smokes folder
  2. Make your Brackets window ~1100px wide or less
  3. Open inline editor on <body>
  4. Scroll to the right

Result: When you scroll way to the right, there's a gap between the background of the inline editor and the background of the rule list. The narrower the window, the bigger the gap.

Expected: No gap. Worked fine before the CodeMirror merge.

This only repros after the Sprint 11 CodeMirror merge from upstream.

core-ai-bot commented 3 years ago

Comment by peterflynn Thursday Jul 12, 2012 at 19:52 GMT


CodeMirror changed the way editors are propped open to the max line width, so presumably that's interfering with how MultiRangeInlineEditor is calculating the width of the inline widget that it creates.

core-ai-bot commented 3 years ago

Comment by peterflynn Tuesday Jul 17, 2012 at 00:44 GMT


So here's a summary... CodeMirror changed the way it props its width open: the "lineSpace" div used to have a fixed width set on it based on the length of the text's longest line. Now it's a regular div, and long lines overflow so its offsetWidth never exceeds the width of the viewport.

The "scroller" div still shows a horizontal scrollbar for two reasons:

The logic in MultiRangeInlineEditor uses lineSpace's offsetWidth to size the inline widget. Hopefully it can just use scrollWidth instead... if not, we can probably use something like the left pos of widthForcer.

We have other logic that depends on the $.offset() of lineSpace. I think that's still fine, since the change from fixed-width propping to overflow: visible doesn't affect horizontal positioning at all.

core-ai-bot commented 3 years ago

Comment by peterflynn Tuesday Jul 17, 2012 at 00:45 GMT


p.s., the CodeMirror change was originally prompted by a bug NJ filed: marijnh/CodeMirror2#550

core-ai-bot commented 3 years ago

Comment by redmunds Tuesday Jul 17, 2012 at 20:13 GMT


Verified fix. Closing.