• chaopeng's avatar
    Only handle mouse left button for Scrollbar · 11b79e0f
    chaopeng authored
    This issue is caused by:
    
    1. Press on any mouse button will update the last_scrollbar_under_mouse_ in
       EventHandler. last_scrollbar_under_mouse_ will set to null and call
       Scrollbar::MouseExited() when mouse middle click out of scrollbar.
    2. Release any mouse button will check last_scrollbar_under_mouse_ for cleanup
       the mouse press state on Scrollbar.
    
    Because mouse middle button press happens before any mouse button release,
    last_scrollbar_under_mouse_ is null then release mouse button will not clear
    the scrollbar press state.
    
    There is another related issue here. We can drag the scrollbar by pressing the
    middle button.
    
    The root cause of the bug is not checking for the left mouse button before
    updating last_scrollbar_under_mouse_ and calling Scrollbar::MouseDown.
    
    In this patch, we only handle mouse left button for Scrollbar.
    
    Bug: 721303
    Change-Id: I714eca2bbdd9dd1628e596dc6b9119bb5de85cc3
    Reviewed-on: https://chromium-review.googlesource.com/1048389
    Commit-Queue: Jianpeng Chao <chaopeng@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#558172}
    11b79e0f
scrollbar-mousedown-move-mouseup-expected.txt 318 Bytes