homerow
homerow copied to clipboard
Safari search bar and certificate overlap
Describe the bug
In some case, like in screenshot, Certificate(u) and search bar(v) will overlap. when select (v) it will open (u)
Screenshots / video

Steps to reproduce the bug
- Go to safari
- open brew.sh
- Click on search bar
- see error
Since Homerow clicks most UI elements in their center, there's a chance two UI elements have have their hitbox in that click position.
I can see two potential fixes:
- Verifying that the UI element at the click position matches the one that Homerow has selected, using
AXUIElementCopyElementAtPosition. If not, then try another coordinate within the focused UI element's bounds. - Issuing an
AXFocusaction instead of left clicking. I don't want to do this because that doesn't solve for the right-click, double-click, and modifier-click cases.
Option 1 will have some performance penalties that lead to delay when clicking. I think I'll sit on it for a while since (I assume) its a rare occurrence.