Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the version of scrollIntoView() that takes a rectangle #1098

Closed
njx opened this issue Dec 18, 2012 · 1 comment
Closed

Expose the version of scrollIntoView() that takes a rectangle #1098

njx opened this issue Dec 18, 2012 · 1 comment

Comments

@njx
Copy link
Contributor

njx commented Dec 18, 2012

When Brackets has an inline editor that contains a nested CodeMirror instance, we do some special work to maintain the visibility of the cursor while in that instance. This is because (horizontally) we have some UI that overlaps the right edge of the inline editor, and we need to account for that when maintaining cursor visibility, and (vertically) we want to make sure that the outer editor scrolls to keep the cursor inside the nested editor visible.

In order to accomplish this, we need the ability to call the (currently internal) flavor of scrollIntoView() that takes a rectangle, as opposed to the public version that just takes a pos, because the rectangle we specify can't be expressed as a pos in the outer editor (since it's a location in the nested editor). Would it be okay to expose the other version of scrollIntoView()?

@njx
Copy link
Contributor Author

njx commented Dec 18, 2012

Works great, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants