• Maggie Cai's avatar
    [Sharesheet] Fix sharesheet button focus issue. · 247f5c29
    Maggie Cai authored
    Currently when we tab through the action bar we cannot focus on the
    sharesheet button. This CL fixes this issue and also add a test for this
    bug.
    
    The issue with the original implementation is because we disable the
    command when we are waiting for feedback from the C++ api, however when
    we tab through the action bar, the canExecute() is called and we cannot
    focus on the sharesheet button while tabing because the command is still
    disabled at the time. Changing the code to keep the command enable if
    the event target is action bar. This should be safe because in this
    event, there should be no change to the selected entry so if the button
    is visible at the time, it should be safe to be enabled.
    
    BUG=1136334, 1097623
    
    Change-Id: I285bb7fe71322c05ae660fb02917126e7491b17a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2460854Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
    Commit-Queue: Maggie Cai <mxcai@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#816063}
    247f5c29
file_manager_browsertest.cc 46.4 KB