Commit a58fea8d authored by Sidney San Martín's avatar Sidney San Martín Committed by Commit Bot

Revert "Switch tabs on mouse down instead of mouse up."

This reverts commit a47974de.

Reason for revert: https://crbug.com/819339

This breaks the flow of:

1. Click a tab.
2. Shift-click to select a range of tabs.
3. Release shift and drag the tabs out into a new window.

…because the ListSelectionModel which backs the tab strip clears the selection when the active item is changed. It's going to take some work to make it behave the right way.

Original change's description:
> Switch tabs on mouse down instead of mouse up.
>
> This is consistent with other Mac apps and with Views, and makes the tab
> strip feel more responsive.
>
> Bug: 799230
> Change-Id: I45a375f5892c10e5886e18f27ba049eb6215a17f
> Reviewed-on: https://chromium-review.googlesource.com/895925
> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
> Commit-Queue: Sidney San Martín <sdy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#533373}

TBR=ellyjones@chromium.org,sdy@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 819339, 799230
Change-Id: I9921e0d41669d6783ff0f8f3f0d4b0746eb72b68
Reviewed-on: https://chromium-review.googlesource.com/953304
Commit-Queue: Sidney San Martín <sdy@chromium.org>
Reviewed-by: default avatarSidney San Martín <sdy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541597}
parent c87ec84e
......@@ -63,9 +63,6 @@ static BOOL PointIsInsideView(NSPoint screenPoint, NSView* view) {
- (void)maybeStartDrag:(NSEvent*)theEvent forTab:(TabController*)tab {
[self resetDragControllers];
// Activate the tab.
[tab selectTab:self];
// Resolve overlay back to original window.
sourceWindow_ = [[tab view] window];
if ([sourceWindow_ isKindOfClass:[NSPanel class]]) {
......@@ -139,6 +136,7 @@ static BOOL PointIsInsideView(NSPoint screenPoint, NSView* view) {
} else if (type == NSLeftMouseDragged) {
[self continueDrag:theEvent];
} else if (type == NSLeftMouseUp) {
[tab selectTab:self];
[self endDrag:theEvent];
break;
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment