Use the current document when evaluating activeElement

Change-Id: I859edf8d23169ac16fcc821b38892ad2a5ec5e6c
Merge "Use the current document when evaluating activeElement"