Skip to content

Conversation

ajbeaven
Copy link
Contributor

A bit of contentious code here it seems.

Pull request #667 seems to have broken popups in IE. This happens because in the onAdd function in L.Popup, uses setOpacity we make opacity 0, and then later on sets it to 1. setOpacity as it is written now means that we can never set opacity to 1.

if (!filter) try { filter = el.filters.item(filterName); } catch (e) { }

value = Math.round(value * 100);
if (value === 100) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This if statement is to fix #600, but personally I don't think it should be there. Rather, it should instead be fixed using css:

.leaflet-marker-icon {
    background: transparent;
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)"; /* IE8 */   
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);   /* IE6 & 7 */      
    zoom: 1;
}

If you agree, we can simply use the else section of the statement.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like setting filters by default for common elements because IE is known to get slower because of this.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a problem with this code: shadow marker icon is all black - it`s not nice. Why?
PS: IE8

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xGen do you mean the CSS code above or the pull request in general?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No css, general.

PS: Im sorry, i dont understand how create a new request (i`m new):
i have a problem too with L.Control.Layers:

var CircleLayer = new L.LayerGroup(),
circleLocation = new L.LatLng(55.743, 37.612),
circleOptions = {color: '#f03', opacity: 0.7},
circle = new L.Circle(circleLocation, 500, circleOptions);
CircleLayer.addLayer(circle);
map.addControl(new L.Control.Layers({'Google':glmap},{'circle': CircleLayer}));

When I unchecked /checked 'circle' - circle is appear, but the color is lost.
This apper in IE8 & IE9. In FF 13 is ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mourner

I don't like setting filters by default for common elements because IE is known to get slower because of this.

You mean in the CSS? I totally agree - which is why you'd put it inside a conditional comment or perhaps modernizr adds a class that could be used. Either way I don't think it should be this javascript's concern. Not a big one, though.

Thanks for your code changes, so much nicer :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xGen create a http://jsfiddle.net/ test case that reproduces the problem and create a new GitHub issue with the description and a link to it

mourner added a commit that referenced this pull request Jul 25, 2012
Fixes popups in IE8 and earlier
@mourner mourner merged commit 3826467 into Leaflet:master Jul 25, 2012
@mourner
Copy link
Member

mourner commented Jul 25, 2012

By the way, currently in master it only sets popup opacities if fadeAnimation is true, and it's not for browsers that don't support transition. So it should have worked before too.

@mourner
Copy link
Member

mourner commented Jul 25, 2012

Cleaned up a bit: 3201dd0

@Malvoz Malvoz added the ie Internet Explorer label May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ie Internet Explorer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants