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

[webkit] corner div interferes with Markers #575

Closed
stsydow opened this issue Mar 10, 2012 · 11 comments · Fixed by #836
Closed

[webkit] corner div interferes with Markers #575

stsydow opened this issue Mar 10, 2012 · 11 comments · Fixed by #836
Assignees
Milestone

Comments

@stsydow
Copy link
Contributor

stsydow commented Mar 10, 2012

The corner div overlaps Markers and catches their click events. (in Chromium 17 - Firefox 10 is fine)

Test case:
Use for example http://leaflet.cloudmade.com/index.html and move the map so that the Marker appears between the left edge and the zoombox. Now the Markers Popup won't open.

Chromium seems to have a bug in the z-index handling, maybe it has something to do with -webkit-transform.

In case of the zoombox this bug is not nice but doesn't hurt that much.
But if you put a bigger control on top of the attributionControl things get nasty.

@stsydow
Copy link
Contributor Author

stsydow commented Mar 12, 2012

Seem to be related to issue #383. If I hardcode webkit3d to false it is fixed.

@mourner
Copy link
Member

mourner commented Jun 23, 2012

Sorry for a late response, could clarify what WebKit browsers/versions are affected? Is it Blackberry-only or some Chrome/Safari versions are affected too?

@ghost ghost assigned mourner Jun 23, 2012
@stsydow
Copy link
Contributor Author

stsydow commented Jun 23, 2012

I've run into it recently with Chromium v19 on Linux. As hack-fix I disabled the
webkit3d property:

index ec54817..b811988 100644
--- a/src/core/Browser.js
+++ b/src/core/Browser.js
@@ -11,7 +11,7 @@
                ie6: ie && !window.XMLHttpRequest,

                webkit: webkit,
-               webkit3d: webkit && ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()),
+               webkit3d: false, //webkit && ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()),

                gecko: ua.indexOf("gecko") !== -1,

It not a real solution, but may be it helps to locate the problem.

@stsydow
Copy link
Contributor Author

stsydow commented Jun 25, 2012

The hackfix dosen't work anymore - it brakes the polylines.
Don't try it anymore. If have some time I'll have a look what's
going on with the z-index there.

For debugging one might start looking before 02c3e9b.

@mourner
Copy link
Member

mourner commented Jun 25, 2012

@danzel I guess the layers animation code needs more any3d checks to make L.Browser.webkit3d = false not break anything (it is used in several occasions, not only this one).

@danzel
Copy link
Member

danzel commented Jun 25, 2012

Yep, have sent a pull to fix this.

New hack will be:

L.Browser.webkit3d = L.Browser.any3d = false;
(You need to set both of them).

@stsydow
Copy link
Contributor Author

stsydow commented Jun 26, 2012

The hackfix doesn't work for me.

I spend some time investigating it. As it seems z-index becomes/should become irrelevant if -webkit-transform is set.
(see https://bugs.webkit.org/show_bug.cgi?id=61824)
So the parctical solution seems to me to position the map controls also via -webkit-transform or with top;left for the 2D case - without any corner container.

I know its not as elegant as the current solution where the Browser does the repositioning and stacking of controls by itself, but I've no better idea.

@danzel
Copy link
Member

danzel commented Jun 27, 2012

Yeah, the hack-fix stops positioning markers/paths with -webkit-transform, which makes them work. Will take another look at it later today to see if/why it isn't.

@danzel
Copy link
Member

danzel commented Jul 2, 2012

Rebased, redid and repushed the fix.

Now you add:

<script>L_DISABLE_3D = true;</script>

Before including leaflet to disable 3d properly. I've tested this on debug/vector/vector-simple.html and debug/map/image-overlay.html

@danzel
Copy link
Member

danzel commented Jul 26, 2012

Have sent a PR that fixes this without needing to disable 3d :-)

@stsydow
Copy link
Contributor Author

stsydow commented Jul 27, 2012

Thanks a lot! Works well.

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

Successfully merging a pull request may close this issue.

3 participants