You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Settings UI Always Scrolls Automatically While Check or Uncheck an Option #68385
bugIssue identified by VS Code Team member as probable bugsettings-editorVS Code settings editor issuestree-widgetTree widget issuesverifiedVerification succeeded
As shown above, the settings UI always scrolls automatically, so I cannot find the modification because it went away. Marking or deselecting any item may cause this issue.
VS Code version: Code 1.31.0 (7c66f58, 2019-02-05T22:35:56.624Z)
OS version: Windows_NT x64 10.0.18334
Reacted by Seth Nielsen, Gregor Weichbrodt, Igor Krupenja and chpxu
I think the ListView renders the setting items with their default heights, then rerenders and saves the offset of the anchor element. Then it fixes the heights of the elements and maintains the offset of the anchor element. But since it measured the anchor element when the elements had default heights, the list will be shifted if the real heights were different from the default heights. Maybe an anchor element should be measured before rendering the items with default heights or something like that. I made the default heights more accurate which helps.
When the config service says something changed, we rerender everything. It seems unnecessary in this case but it's hard to tell that the change event came "from" this instance of the settings editor and also, some values can be normalized when they get back to us, and since it should be safe to rerender, I don't put a lot of effort into reducing unneeded renders.
Another way to repro this, open two settings editors in two groups, change a setting in Group 1, and see the editor in Group 2 scroll.
If this just can't really be fixed there are things I can do like updating the value of a rendered setting row without actually calling setChildren. But that only works for some settings, adds more complexity, etc.
bugIssue identified by VS Code Team member as probable bugsettings-editorVS Code settings editor issuestree-widgetTree widget issuesverifiedVerification succeeded
Activity
chpxu commentedon Feb 11, 2019
Annoyed me so much. Note that it happens with dropdowns and selecting an item, and occasionally by inputting textbox and clicking to defocus it.
sethmnielsen commentedon Feb 15, 2019
Having this exact problem as well. I just installed VS code and am having this problem while giving it a trial run. Sigh....
roblourens commentedon Feb 18, 2019
Maybe related to #65319
Mitigate #68385
roblourens commentedon Feb 24, 2019
This isn't what I thought it was, I have to assign to you João Moreno (@joaomoreno).
I think the ListView renders the setting items with their default heights, then rerenders and saves the offset of the anchor element. Then it fixes the heights of the elements and maintains the offset of the anchor element. But since it measured the anchor element when the elements had default heights, the list will be shifted if the real heights were different from the default heights. Maybe an anchor element should be measured before rendering the items with default heights or something like that. I made the default heights more accurate which helps.
joaomoreno commentedon Feb 25, 2019
roblourens Why is the list re-rendered when a check box is clicked?
👍
roblourens commentedon Feb 25, 2019
When the config service says something changed, we rerender everything. It seems unnecessary in this case but it's hard to tell that the change event came "from" this instance of the settings editor and also, some values can be normalized when they get back to us, and since it should be safe to rerender, I don't put a lot of effort into reducing unneeded renders.
Another way to repro this, open two settings editors in two groups, change a setting in Group 1, and see the editor in Group 2 scroll.
If this just can't really be fixed there are things I can do like updating the value of a rendered setting row without actually calling setChildren. But that only works for some settings, adds more complexity, etc.
joaomoreno commentedon Feb 26, 2019
It can definitely be fixed. I was just wondering why the rerender was needed. ;)
joaomoreno commentedon Mar 13, 2019
cc Isidor Nikolic (@isidorn)
fixes #68385