Skip to content

Trackpad: Tab switch on mouse scroll: horizontal scrolling sensitivity too high #96409

Closed

Description

Refs: #95952

  1. "workbench.editor.scrollToSwitchTabs": natural
  2. Have a mouse with horizontal press
  3. Horizontal scroll is too senstivie in the tab area and seems pretty useless due to that

Vertical scroll works just fine. And horizontal scroll in the editor has good sensitivity so maybe you could check with Alex how he handles the horizontal scroll.

Activity

  1. changed the title [-]Tab switch on mouse scroll: horizontal scrolling sensitivy to high[/-] [+]Tab switch on mouse scroll: horizontal scrolling sensitivity too high[/+] on Apr 28, 2020
  2. bpasero commented on Apr 28, 2020

    @bpasero
    Contributor

    Isidor Nikolic (@isidorn) I assume you tested this from the balcony where you have no external mouse attached but the macOS touchpad?

  3. isidorn commented on Apr 28, 2020

    @isidorn
    Author

    Benjamin Pasero (@bpasero) no it is raining, and I am on the balcony only for the standup.
    This is with an external mouse. The MS one. The small scroll can be pressed left and righ.

  4. added
    feature-request
    workbench-tabs
    on Apr 29, 2020
  5. added
    help wanted
    on Apr 29, 2020
  6. bpasero commented on Apr 29, 2020

    @bpasero
    Contributor

    Up for help: the code that checks for the wheel event is here:

    this._register(addDisposableListener(tabsContainer, EventType.MOUSE_WHEEL, (e: MouseWheelEvent) => {
    const activeEditor = this.group.activeEditor;
    if (!activeEditor || this.group.count < 2) {
    return; // need at least 2 open editors
    }
    // Shift-key enables or disables this behaviour depending on the setting
    if (this.accessor.partOptions.scrollToSwitchTabs === 'off') {
    if (!e.shiftKey) {
    return; // 'off': only enable this when Shift-key is pressed
    }
    } else {
    if (e.shiftKey) {
    return; // 'on': only enable this when Shift-key is not pressed
    }
    }
    // Figure out scrolling direction
    let scrollingUp = e.deltaX < 0 || e.deltaY < 0;
    if (this.accessor.partOptions.scrollToSwitchTabs === 'reverse') {
    scrollingUp = !scrollingUp;
    }
    const nextEditor = this.group.getEditorByIndex(this.group.getIndexOfEditor(activeEditor) + (scrollingUp ? -1 : 1));
    if (!nextEditor) {
    return;
    }
    // Open it
    this.group.openEditor(nextEditor);
    // Disable normal scrolling, opening the editor will already reveal it properly
    EventHelper.stop(e, true);
    }));

  7. added
    macos
    trackpad/scroll
    on May 8, 2020
  8. changed the title [-]Tab switch on mouse scroll: horizontal scrolling sensitivity too high[/-] [+]Trackpad: Tab switch on mouse scroll: horizontal scrolling sensitivity too high[/+] on May 8, 2020
  9. added
    good first issue
    on May 8, 2020
  10. garyshell commented on May 8, 2020

    @garyshell

    To add my specifics here from #97265, I am on a Mac and using a Mac "Magic Mouse" that mimics a trackpad for horizontal and vertical scrolling. Both of those work as expected within an editor window, but when using horizontal scroll in the tabs, it shoots instantly to the last tab when scrolled right and instantly to the first tab when scrolling left.

  11. texastoland commented on May 9, 2020

    @texastoland

    Benjamin Pasero (@bpasero) Maybe it's obvious but the issue looks like a tab change is triggered every single scroll event. It just needs throttled (or even debounced to introduce a little lead time) with at least 100 ms threshold. There are already event decorators in common:

    @throttle(
    100,
    (a: number, b: number) => a + b,
    () => 0
    )
    report(p: number): void {
    this._handle(p);
    }

  12. 6 remaining items

  13. SilantevDenis commented on Nov 18, 2020

    @SilantevDenis

    I have the same problem

  14. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Dec 8, 2020
  15. added
    author-verification-requested
    on Dec 16, 2020
  16. github-actions commented on Dec 16, 2020

    @github-actions
    Contributor

    This bug has been fixed in to the latest release of VS Code Insiders!

    Isidor Nikolic (@isidorn), you can help us out by confirming things are working as expected in the latest Insiders release. If things look good, please leave a comment with the text /verified to let us know. If not, please ensure you're on version f3e95ed of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

    Happy Coding!

  17. texastoland commented on Dec 18, 2020

    @texastoland

    /verified 👏🏼

  18. isidorn commented on Dec 18, 2020

    @isidorn
    Author
  19. locked and limited conversation to collaborators on Jan 23, 2021
  20. added
    verification-needed
    on Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

author-verification-requestedfeature-requestgood first issuehelp wantedinsiders-releasedmacostrackpad/scrollverification-neededverifiedworkbench-tabs

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions