Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix issue #1240 (Inline editor background width) #1264

Merged
merged 1 commit into from
Jul 17, 2012
Merged

Conversation

peterflynn
Copy link
Member

Fix issue #1240 (Inline editor background doesn't extend all the way to right when scrolling)

CodeMirror changed the way it props its width open such that lineSpace's width is no longer explicitly set to the max width of all the lines (lines wider than the viewport simply overflow it). We were checking this width to decide how wide inline editors must be. However, lineSpace's content is still as wide as the max line (due to the pos of the new widthForcer div) so we can use lineSpace's scrollWidth and still get an accurate number.

See the bug for slightly more detail.

right when scrolling) - CodeMirror changed the way it props its width open
such that lineSpace's width is no longer explicitly set to the max width
of all the lines (lines wider than the viewport simply overflow it). We were
checking this width to decide how wide inline editors must be. However,
lineSpace's _content_ is still as wide as the max line (due to the pos of
the new widthForcer div) so we can use lineSpace's scrollWidth and still get
an accurate number.
@ghost ghost assigned redmunds Jul 17, 2012
@redmunds
Copy link
Contributor

reviewing

@redmunds
Copy link
Contributor

Yes, this fixes the issue captured in #1240, but I am seeing another issue:

  1. open any file that requires a horizontal scroll (e.g. brackets/src/index.html)
  2. select 1 or more lines of text
    >> notice that the selection does not extend all the way to the right
  3. scroll horizontally to the right
    >> selection gap on right gets even bigger

Is that related to this fix, or should I log a new issue?

@peterflynn
Copy link
Member Author

@redmunds: yes, please log a new issue. Looks like that bug is also due to the CodeMirror merge this sprint, but it's unrelated to the fix here (in fact it repros even in a vanilla CodeMirror build from upstream, without any Brackets stuff at all).

@redmunds
Copy link
Contributor

New issue #1267 logged for problem described above

@redmunds
Copy link
Contributor

This fix looks good.

redmunds added a commit that referenced this pull request Jul 17, 2012
Fix issue #1240 (Inline editor background width)
@redmunds redmunds merged commit a174091 into master Jul 17, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants