Ticket #1635 (reopened feature)

Opened 5 years ago

Last modified 2 years ago

0 Z-Index for Map Div

Reported by: euzuro Owned by: euzuro
Priority: critical Milestone: 2.13 Release
Component: Map Version: SVN
Keywords: Cc:
State: Review

Description

FF2 and FF3 deal with zindexing differently.

FF2: no specified zindex -> zindex is treated as 0 FF3: no specified zindex -> go directly to all childrens' zindexes

for example, a document with DOM like this:

 - elem1: zindex=5
 - elem2: zindex=30
 - mapDiv: zindex=none
    - layer1: zindex=10
    - control1: zindex=100

FF2 would order the elements (from top to bottom) as such:

elem2 (30)
elem1 (5)
mapDiv-layer1 (0-10)
mapDiv-control1 (0-100)

...but FF3 would order the elements (again, top to bottom) as:

mapDiv-control1 (0-100)
elem2 (30)
mapDiv-layer1 (0-10)
elem1 (5)

all of this is causing people grief in FF3 because most people do not set the zIndex on the map div, and therefore their layer, control, popup, etc are getting scattered in the z-plane.

The solution to this, then, is to assign a default zIndex to the main map div.

Attachments

zindex.patch Download (289 bytes) - added by euzuro 5 years ago.
mandate a zero z-index
1635.diff Download (279 bytes) - added by bbinet 2 years ago.

Change History

Changed 5 years ago by euzuro

  • owner set to euzuro
  • status changed from new to assigned

the fix here is to add

    z-index: 0;

to the default css definition for div.olMap in theme/style.css

That, however, does not exist yet, until #1179 is approved.

Changed 5 years ago by euzuro

mandate a zero z-index

Changed 5 years ago by euzuro

  • state changed from Needs More Work to Review

Changed 5 years ago by crschmidt

  • state changed from Review to Commit

Looks good. Hit it.

Changed 5 years ago by euzuro

can anyone test this patch on

Safari 3.1.2 on the Mac

?? s.lime said that this patch maybe wasn't fixing the issue there.

Changed 5 years ago by crschmidt

Looking at  http://www.dnr.state.mn.us/maps/compass.html , seems like it works fine to me in Safari: If he can describe his problem more thoroughly, that might help us out...

In any case, this change can't *hurt*, and might help: if he can offer comments on what he did instead of this so that we can fix it, we can look into it.

Changed 5 years ago by euzuro

  • status changed from assigned to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [7594]) make the zIndex of the map div 0 (unless otherwise specified by user). this fixes zindexing issues in FF3. (Closes #1635)

Changed 2 years ago by bbinet

  • status changed from closed to reopened
  • state changed from Complete to Needs More Work
  • version changed from 2.6 to SVN
  • resolution fixed deleted
  • milestone changed from 2.7 Release to 2.12 Release

Reopen this one 3 years later (yeah that's archeology!), since I think the patch does not fix the issue reported. I recently faced an issue where a jquery-ui datepicker (which z-index was set to 1) was hidden behind the map.

Actually z-index is only taken into account for a positioned box:  http://www.w3.org/TR/CSS2/visuren.html#z-index

So we need to add position:relative in addition to z-index:0.

I guess that the original patch has been tested on a page where a parent was already positioned.

Changed 2 years ago by bbinet

Changed 2 years ago by bbinet

  • state changed from Needs More Work to Review

1635.diff Download makes the olMap div element a positioned box so that z-index:0 is interpreted correctly.

Note: See TracTickets for help on using tickets.