Commit d3b95d68 authored by Alex Newcomer's avatar Alex Newcomer Committed by Commit Bot

cros: Fix stacked launcher animations.

In the old version, launching the launcher and then rapidly entering
text and deleting it multiple times caused the scheduled animations to
build up causing the launcher to continue to animate between states long
after text had stopped being entered/removed from the searchbox.

I added a line to stop the current animation before scheduling another
one, which prevents the behavior.

Bug: 750668
Change-Id: I3134679ad2b378d21c5e953d50ee8909ffdc47fd
Reviewed-on: https://chromium-review.googlesource.com/598743Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491591}
parent 36cbc24e
......@@ -934,6 +934,7 @@ void AppListView::StartAnimationForState(AppListState target_state) {
ui::LayerAnimator* animator = fullscreen_widget_->GetLayer()->GetAnimator();
animator->set_preemption_strategy(
ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
animator->StopAnimating();
animator->ScheduleAnimation(
new ui::LayerAnimationSequence(std::move(animation_element)));
}
......
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