Skip to content

Keep scroll position stable when closing a tab in the tab well #13001

Closed

Description

  • VSCode Version: Code 1.5.3 (5be4091, 2016-09-22T08:50:42.185Z)
  • OS Version: Windows_NT ia32 10.0.14393

Steps to Reproduce:

  1. open many files so that tabs are scrollable, have the first (left-most) tab active
  2. scroll to the farthest (right-most) tabs
  3. close a tab in that area
  4. the whole tab bar scrolls back to the left-most position (active tab)

This leads to loss of focus and confusion. If I want to close multiple tabs there, I have to scroll to them each time I close one.

Activity

  1. bpasero commented on Sep 29, 2016

    @bpasero
    Contributor

    František Svoboda (@PunchyRascal) share a video? I think this behaviour is intentional if the first tab was active before opening the last one (we go back in MRU order and open it).

  2. added
    info-needed
    on Sep 29, 2016
  3. PunchyRascal commented on Sep 29, 2016

    @PunchyRascal
    Author

    image

    I see no reason to generate focus to active tab since the tab never lost the focus, it is still open, I am just trying to close a few tabs at the end of the tab bar, I am not activating other tabs or closing active tab.

    I edited the initial report for better clarity.

  4. bpasero commented on Sep 29, 2016

    @bpasero
    Contributor

    František Svoboda (@PunchyRascal) oh yeah I see it, uncooool

  5. added
    bug
    and removed
    info-needed
    on Sep 29, 2016
  6. bpasero commented on Oct 3, 2016

    @bpasero
    Contributor

    I am undecided how to best fix this because it might also cause in users reporting issues why the current tab is not revealed. I think eventually maybe it needs to boil down to a setting which sucks too.

    Maybe a delay could be added that after a close we only reveal the active tab after some timeout so that you can continue closing tabs without loosing context.

    Anyway, I would accept a PR in this area if someone wants to jump in 👍

  7. added
    feature-request
    workbench-tabs
    help wanted
    and removed
    bug
    on Oct 3, 2016
  8. 12 remaining items

  9. initialshl commented on Mar 9, 2017

    @initialshl
    Contributor

    It seems that the focus is lost when you close inactive tabs (using middle click or right-click menu), and closing your active tab activates the previous editor, hence the focus gained.

    vscode-tab-well-close

  10. PunchyRascal commented on Mar 9, 2017

    @PunchyRascal
    Author

    It is difficult to demonstrate that the editor does not receive the keystrokes, but after closing the tab, I kept typing, but nothing happened.

    tab-bar-focus gif

  11. bpasero commented on Mar 9, 2017

    @bpasero
    Contributor

    Oh yeah I can reproduce (only when closing an inactive tab), that should be something to fix...

  12. removed
    help wanted
    on Mar 9, 2017
  13. bpasero commented on Mar 9, 2017

    @bpasero
    Contributor

    Ok, let's see how it goes, I pushed a fix that ended up to be a larger refactoring (also for #22292) that is why I did not merge your PR.

    Let me know how it goes. The idea is that invoking close from within the tab container will not cause the active tab to be revealed (using the same flag to block revealing once).

  14. PunchyRascal commented on Mar 10, 2017

    @PunchyRascal
    Author

    Just tried it, it's amazing, thanks :)

  15. bpasero commented on Mar 10, 2017

    @bpasero
    Contributor

    Cool. The only thing I am not doing, which maybe users might complain is that when focus moves back into the editor (if it was outside e.g. in the explorer), we do not reveal the active tab. But that is actually also the behaviour today.

  16. isidorn commented on Mar 28, 2017

    @isidorn

    Adding verified by user

  17. added
    verification-needed
    verified
    on Mar 28, 2017
  18. locked and limited conversation to collaborators on Nov 18, 2017
  19. added a commit that references this issue on Sep 6, 2026
    17b38a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestverification-neededverifiedworkbench-tabs

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions