New issue
Advanced search Search tips
Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Regression



Sign in to add a comment
link

Issue 914527: tab-dragging using touch to snap doesn't work in clamshell mode sometimes

Reported by x...@chromium.org, Dec 12 Project Member

Issue description

Chrome Version: 73.0.3638.0
OS: Chrome

What steps will reproduce the problem?
(1) In clamshell mode, open a browser and open an additional tab
(2) Make sure the browser is placed in the middle of the screen, and its title bar area is right at the top of the screen
(3) Touch on the tab and drag the tab out and snap it to one side of the screen

What is the expected result?
The tab should be snapped 

What happens instead?
The tab is merged back into its source window

It's easy to repro, but not 100% reproducible. 
Not sure when it regressed.
 

Comment 1 by mukai@chromium.org, Dec 13

Cc: -mukai@chromium.org x...@chromium.org
Owner: mukai@chromium.org
Status: Started (was: Assigned)
I'm still not sure which CL triggers this, but found the cause.

- at the end of drag, WmToplevelWindowEventHandler::CompleteDrag ends up with changing the window bounds
- this causes TabDragController::OnWidgetBoundsChanged, invoking Drag(GetCursorScreenPoint())
- since is_touch_down is already false (https://cs.chromium.org/chromium/src/chrome/browser/ui/views/tabs/tab_drag_controller.cc?sq=package:chromium&g=0&l=1902), it instead invokes display::Screen::GetScreen()->GetCursorScreenPoint() which returns the last *mouse* location
- if that location happens to be a tabstrip of another window, then the merge happens


This 'is_touch_down'has been there for a while -- I am still not sure which CL causes this. But maybe we should fix on TabDragController for not invoking Drag() when neither mouse nor touch are active.

Comment 2 by bugdroid1@chromium.org, Dec 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c5454142857d5d2e166133d5dbaf3a803301f663

commit c5454142857d5d2e166133d5dbaf3a803301f663
Author: Jun Mukai <mukai@chromium.org>
Date: Fri Dec 14 17:53:21 2018

Do not invoke Drag() when neither mouse nor touch is pressed

Bug:  914527 
Test: the new test case covers
Change-Id: Iab56b2aa9ec477542e22d7d684e24605f4934257
Reviewed-on: https://chromium-review.googlesource.com/c/1375110
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616734}
[modify] https://crrev.com/c5454142857d5d2e166133d5dbaf3a803301f663/chrome/browser/ui/views/tabs/tab_drag_controller.cc
[modify] https://crrev.com/c5454142857d5d2e166133d5dbaf3a803301f663/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc

Comment 3 by mukai@chromium.org, Dec 14

Status: Fixed (was: Started)

Sign in to add a comment