Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert coordinates when initializing drag drop controller #17876

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

sangwoo108
Copy link
Contributor

@sangwoo108 sangwoo108 commented Apr 3, 2023

Chromium adjusts x coordinate by the width of dragged tabs. This starts unexpected drag and drop session, and this causes dragged tabs or a window jump around.

Resolves brave/brave-browser#29465

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

These are reproducible on Windows

Window jumping

  • Make tabs
  • Select all tabs
    • by clicking the first tab and then the last tab/ or clicking the last tab and then the firs tab
      • The window shouldn't move.

Tabs jumping

  • Make tabs
  • Select some tabs with "Shift key"
    • The tab shouldn't jump

Chromium adjusts x coordinate by the width of dragged tabs.
This starts unexpected drag and drop session, and this
causes dragged tabs or a window jump around.
@sangwoo108 sangwoo108 marked this pull request as ready for review April 3, 2023 22:46
Copy link
Contributor

@fallaciousreasoning fallaciousreasoning left a comment

Choose a reason for hiding this comment

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

LGTM!

@sangwoo108 sangwoo108 merged commit 013ddfe into master Apr 4, 2023
@sangwoo108 sangwoo108 deleted the sko/vtab-jump branch April 4, 2023 02:25
@github-actions github-actions bot added this to the 1.52.x - Nightly milestone Apr 4, 2023
brave-builds added a commit that referenced this pull request Apr 6, 2023
@stephendonner
Copy link
Contributor

stephendonner commented Apr 19, 2023

Verification PASSED using

Brave 1.52.56 Chromium: 112.0.5615.121 (Official Build) nightly (64-bit)
Revision 39cc4e45904ae9f1741c4fbaa866e629c96f2268-refs/branch-heads/5615_51@{#8}
OS Windows 10 Version 22H2 (Build 19045.2846)

Followed the specific steps to reproduce for each case, below, from #17876 (comment).

Steps:

  1. installed 1.52.56
  2. launched Brave
  3. set brave://flags/#brave-vertical-tabs to Enabled
  4. clicked Relaunch

Tab-jumping

(continued from Steps)
5. loaded a bunch of sites in tabs
6. context-clicked on a tab
7. chose Use vertical tabs
8. selected a few contiguous tabs using shift

Confirmed no more tab-jumping behavior, as seen below in 1.51.95

1.52.56 1.51.95
tab-fixed-nightly tab-jump-beta

Window-jumping

(continued from Steps)
5. loaded a bunch of sites in tabs
6. context-clicked on a tab
7. chose Use vertical tabs
8. selected the first and last tab, while holding shift to trigger contiguous selection

Confirmed no more window-jumping behavior, as seen below in 1.51.95

1.52.56 1.51.95
no-window-jumping window-jumping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tabs jumps when selecting multiple tabs
3 participants