Skip to content

Conversation

rchiodo
Copy link

@rchiodo rchiodo commented Apr 17, 2020

For #11238

Monaco editor was forcing a scroll to its own lines even when it doesn't have focus.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

private scrollToCurrentPosition(_editor: monacoEditor.editor.IStandaloneCodeEditor) {
// Unfortunately during functional tests we hack the line count and the like.
if (isTestExecution()) {
if (isTestExecution() || !this.props.hasFocus) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if anything relied on the previous behavior where you could do this to an out of focus cell. But I'm not seeing anything. So looks good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if it did, I'm guessing that the current behavior is much worse than whatever we'd be breaking.

@rchiodo rchiodo merged commit 1768483 into master Apr 18, 2020
@rchiodo rchiodo deleted the rchiodo/fix_scroll branch April 18, 2020 00:23
rchiodo added a commit that referenced this pull request Apr 18, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
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.

4 participants