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

Firefox Image Map Click Through - Possible Fix #59

Closed
marketinview opened this issue May 31, 2019 · 2 comments
Closed

Firefox Image Map Click Through - Possible Fix #59

marketinview opened this issue May 31, 2019 · 2 comments

Comments

@marketinview
Copy link

Currently, the image map demo click through doesn't work in Firefox..it requires two clicks. I had the need to do a click through and found a method that works in Firefox (as well as Chrome and Edge) to fire a click at a specific x,y:

function clickxy(x, y) {
    var ev = new MouseEvent('click', {
        'view': window,
        'bubbles': true,
        'cancelable': true,
        'clientX': x,
        'clientY': y
    });
    var el = document.elementFromPoint(x, y);
    el.dispatchEvent(ev);
} 
@thdoan
Copy link
Owner

thdoan commented Jun 9, 2019

This was a variable scope issue and has been fixed in v2.3.3. Please test the updated demo you linked to above (be sure to Shift + F5) and close if it works for you.

thdoan added a commit that referenced this issue Jun 9, 2019
@marketinview
Copy link
Author

Fix confirmed.

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

2 participants