Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hit-a-Hint couldn't find rounded link elements #9

Open
sugyan opened this issue Apr 18, 2014 · 0 comments
Open

Hit-a-Hint couldn't find rounded link elements #9

sugyan opened this issue Apr 18, 2014 · 0 comments

Comments

@sugyan
Copy link

sugyan commented Apr 18, 2014

hit a hint function cannot draw hints for some link elements, such as "Twitter Bootstrap" style button.
because... is_viewable function checks document.elementFromPoint(rect.left, rect.top), but it found parent element if link element is rounded.

For example,

<div><a style="display:block; border-radius:4px;" href="foo">foo</a></div>

document.elementFromPoint(rect.left, rect.top); returns div element, it is not a element.

var _e = document.elementFromPoint(rect.left, rect.top);
if (_e && (_e === elem || elem.contains(_e))) return rect;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant