[chromedriver] Check document.hasFocus() for IsElementFocus
document.activeElement could return body when no element has focus. When user first navigate to url or switch frame, we don't want to treat this body as focus. Therefore, we will check document.hasFocus() first. Bug: chromedriver:3502,b/157759309 Change-Id: I87e649423a6fde55a7b8a273c3500787045edac3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225521Reviewed-by:John Chen <johnchen@chromium.org> Commit-Queue: Shengfa Lin <shengfa@google.com> Cr-Commit-Position: refs/heads/master@{#774266}
Showing
Please register or sign in to comment