[Sharesheet] Fix sharesheet button focus issue.
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:Luciano Pacheco <lucmult@chromium.org> Commit-Queue: Maggie Cai <mxcai@chromium.org> Cr-Commit-Position: refs/heads/master@{#816063}
Showing
Please register or sign in to comment