Fixed an issue where the offsetX and offsetY properties may not correctly reference the desired element