Position test element so it is actually fixed to viewport

Fixes #17626

(cherry picked from commit 65e989efbcda628e72c9616faf11d480aacebf2f)