Skip to content

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

@sugyan

Description

@sugyan

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions