| Index: ash/shelf/shelf_button.cc
|
| diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc
|
| index 53cf800bbb5e92de9455233308ccf9c3be89871c..d9fa9a4f67dadd8d30abce42528da1b051db9836 100644
|
| --- a/ash/shelf/shelf_button.cc
|
| +++ b/ash/shelf/shelf_button.cc
|
| @@ -315,8 +315,12 @@ void ShelfButton::ShowContextMenu(const gfx::Point& p,
|
| destroyed_flag_ = nullptr;
|
| // The menu will not propagate mouse events while its shown. To address,
|
| // the hover state gets cleared once the menu was shown (and this was not
|
| - // destroyed).
|
| - ClearState(STATE_HOVERED);
|
| + // destroyed). In case context menu is shown target view does not receive
|
| + // OnMouseReleased events and we need to cancel capture manually.
|
| + if (shelf_view_->drag_view() == this)
|
| + OnMouseCaptureLost();
|
| + else
|
| + ClearState(STATE_HOVERED);
|
| }
|
| }
|
|
|
|
|