Commit 00881151 authored by Weidong Guo's avatar Weidong Guo Committed by Commit Bot

Fix app icon issue after long press in folder

Background:
Long press on app icon in folder will enlarge the icon, but release will
not reset it. The long press gesture event is not handled by
AppListItemView, thus passed to AppsGridView which handles it. The
gesture end event will thus be sent to AppsGridView directly without
going through AppListItemView. This is caused by go/cgcl/987293

Change:
Only handle the scroll begin event in AppsGridView if in folder instead
of all gesture events.

BUG=830982

Change-Id: I2ca5bddaf22cd198d6e9cca5ee5f04c9798153e8
Reviewed-on: https://chromium-review.googlesource.com/1008906Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Commit-Queue: Weidong Guo <weidongg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551023}
parent 613f5543
...@@ -911,11 +911,11 @@ void AppsGridView::OnGestureEvent(ui::GestureEvent* event) { ...@@ -911,11 +911,11 @@ void AppsGridView::OnGestureEvent(ui::GestureEvent* event) {
return; return;
} }
// Gesture events should not be passed to ancestor views if it occurs inside // Scroll begin events should not be passed to ancestor views if it occurs
// the folder bounds even it is not handled. This prevents user from closing // inside the folder bounds even it is not handled. This prevents user from
// the folder when scrolling inside it. // closing the folder when scrolling inside it.
if (pagination_controller_->OnGestureEvent(*event, GetContentsBounds()) || if (pagination_controller_->OnGestureEvent(*event, GetContentsBounds()) ||
folder_delegate_) { (folder_delegate_ && event->type() == ui::ET_GESTURE_SCROLL_BEGIN)) {
event->SetHandled(); event->SetHandled();
} }
} }
......
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