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

.hoverInfo() breaks CSS path:hover in Firefox #33

Open
wahlatlas opened this issue Nov 26, 2015 · 3 comments
Open

.hoverInfo() breaks CSS path:hover in Firefox #33

wahlatlas opened this issue Nov 26, 2015 · 3 comments
Labels
Milestone

Comments

@wahlatlas
Copy link

Say you wanted to have focus-rings on mousing over municipalities like so

path:hover {stroke: purple; stroke-width: 3;}

just add this line in the style section of
https://github.com/floledermann/mapmap-examples/blob/master/tutorial/basics.html

This will work as expected in all browsers except Firefox when you also have .hoverInfo invoked. If you take out .hoverInfo and leave the zoom behavior in, the css based path:hover will also work in Firefox.

Now I can see mapmap.js provides something like

        hoverEl.on('mouseenter', function() {
        hoverEl.css(options.hoverEnterStyle);
            }).on('mouseleave', function() {
        hoverEl.css(options.hoverLeaveStyle);

but I couldn't get it to do the focus rings I wanted.

In analyzing this issue I found some duplicate use of pointer events (as attribute and as style) in the path elements mapmap.js creates, but they seem unrelated

pointer

@floledermann floledermann added this to the immediate milestone Jul 3, 2016
@floledermann
Copy link
Owner

I can confirm this, but it doesn't seem to depend on even adding .hoverInfo() on my machine. I had an idea for a fix, unfortunately it didn't work, so I have to investigate this further.

Firefox mouse event handling on SVG elements seems to be pretty broken, I found a related bug but I am not sure if this is related.

@wahlatlas
Copy link
Author

Thanks for taking the time to look after the minor problems and Firefox intricacies.
At least on static SVG, Firefox does the path:hover as intended, see here
http://vis.uell.net/mapmap/test-hover-ff.html

@floledermann
Copy link
Owner

Yes, I know, this has something to do with dynamically generated elements. I hope I have more time to look into this after the FOSSGIS conference next week.

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

No branches or pull requests

2 participants