Open core-ai-bot opened 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.
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.
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
Issue by peterflynn Thursday Jul 12, 2012 at 19:51 GMT Originally opened as https://github.com/adobe/brackets/issues/1240
<body>
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.