Skip to content

Quick Fix shows at wrong position #112391

Closed

Description

  • VSCode Version: 1.52
  • OS Version: MacOS Big Sur

Steps to Reproduce:

  1. Declare a variable (javascript).
  2. Decide that you want to rename it.
  3. Go click on it to rename it.
  4. A "quickfix" this variable is declared but never read box gets in the way so I can't change the name.

Does this issue occur when all extensions are disabled?: Yes

Activity

  1. mjbvz commented on Dec 13, 2020

    @mjbvz
    Contributor

    Why can't you rename it? Please share a screenshot (or, even better, a video) of what isn't working

  2. added
    info-needed
    on Dec 13, 2020
  3. andrewitsover commented on Dec 14, 2020

    @andrewitsover
    ContributorAuthor

    The dialog box appears over the code, so I can't click on any of the code. I have attached a video. This only started occurring with the latest release. Something has changed, such as the algorithm to place the dialog box or the speed at which the dialog box appears.
    unused.zip

  4. andrewitsover commented on Dec 14, 2020

    @andrewitsover
    ContributorAuthor

    Here are some screenshots as well.
    Screen Shot 2020-12-14 at 3 30 29 pm
    Screen Shot 2020-12-14 at 3 30 23 pm

  5. mjbvz commented on Dec 14, 2020

    @mjbvz
    Contributor

    Sandeep Somavarapu (@sandy081) Assigning you since this looks like a bug with the positioning of the problems hover widget

  6. sandy081 commented on Dec 16, 2020

    @sandy081
    Member

    I cannot repro it.

    image

    Are there any specific steps you followed to repro this? May be you have some settings applied where I do not have or vice-versa. Is it possible to reproduce this by disabling all extensions except the extension that provides quick fixes?

  7. sandy081 commented on Dec 16, 2020

    @sandy081
    Member

    Alexandru Dima (@alexdima) Any idea why this can happen?

  8. andrewitsover commented on Dec 16, 2020

    @andrewitsover
    ContributorAuthor

    The only extension I have is debugger for Chrome. The only settings I have are:

    {
        "workbench.colorTheme": "Default Light+",
        "editor.tabSize": 2,
        "extensions.ignoreRecommendations": false,
        "editor.minimap.enabled": true,
    }
    

    I would probably suggest making sure the window size is the default size when first installed. Maybe if the window size is larger, the algorithm will come up with a different place to put the box. Also I would suggest diffing between the previous version as it didn't happen then. I am not even sure if there was a quickfix suggestion for unused vars in the previous version.

  9. andrewitsover commented on Dec 16, 2020

    @andrewitsover
    ContributorAuthor

    It kind of looks like the "quickfix" section is not factored into the algorithm that places the box and it is instead aligning with the box excluding that section.

  10. andrewitsover commented on Dec 17, 2020

    @andrewitsover
    ContributorAuthor

    I cloned vscode and built it from the source. The same problem occurred. I started to debug it and confirmed my suspicion that the quick fix bar (the action bar) is not being recognised in the positioning algorithm. I altered the css of monaco to give an explicit height to the action bar and that fixed the problem.

    .monaco-hover .hover-row.status-bar {
        font-size: 12px;
        line-height: 22px;
        height: 22px; // I added this
    }
    
  11. andrewitsover commented on Dec 17, 2020

    @andrewitsover
    ContributorAuthor

    Ok so what is happening is the dialog box and the action bar are being made visible at different times. A race condition determines whether monaco measures the height of the dialog box with the action bar visible or not. This is why the bug will not occur if you step through the code. Setting the height explicitly works because it is measured even if there is no text in the element.

  12. andrewitsover commented on Dec 17, 2020

    @andrewitsover
    ContributorAuthor

    Sandeep Somavarapu (@sandy081) The reason you can't reproduce it is because, as you can see, you have "Peek Problems" in addition to the "Quick Fixes". Looking at the code of renderMarkerStatusbar, the peek problems code is run synchronously, but the quick fix action is based on a promise that allows for the race condition. For people who don't have anything other than "Quick Fixes" in the action bar, it will cause the bug.

    It looks like the solution is to make the placeholder synchronous, or the entire actions container synchronous.

  13. added
    bug
    editor-hover
    and removed
    info-needed
    on Dec 18, 2020
  14. added
    unreleased
    on Dec 18, 2020
  15. changed the title [-]TS(6133)[/-] [+]Quick Fix shows at wrong position[/+] on Dec 18, 2020
  16. added
    insiders-released
    and removed
    unreleased
    on Dec 21, 2020
  17. teal2 commented on Jan 5, 2021

    @teal2

    Same problem here.

  18. added
    verified
    on Jan 27, 2021
  19. locked and limited conversation to collaborators on Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugeditor-hoverinsiders-releasedverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions