JSFiddle - React, Tailwind, and code Playground

HTML

<input style="position:absolute; left:100px; top:100px" />

JavaScript

var coords = [100, 100],
    elems = document.getElementsByTagName("*");
for(var i = 0; i < elems.length; i++) {
    var left = elems[i].offsetLeft,
        top = elems[i].offsetTop,
        width = elems[i].offsetWidth;
        height = elems[i].offsetHeight;
    if((left <= coords[0]) && (left + width >= coords[0]) && (top <=coords[1]) && (top + height >= coords[1])) {
        elems[i].focus();
    }
}