strange graphic placement when link wraps line

BradM - March 30, 2007 - 22:51
Project:External Links
Version:5.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed
Description

Hi,

I like this mod, thanks for creating it. I have found that if a link wraps onto a second line (which sometimes happens in a sidebar), the graphic is displaced, it appears overlapped by the link text. I only see this in IE 6.0, it shows up fine in Firefox 1.5.0.11.

Brad

AttachmentSize
extlinks.jpg6.37 KB

#1

quicksketch - May 6, 2007 - 00:18
Status:active» needs review

Could you try replacing the extlink.css with this code and let me know if it works on IE6 and IE7? It seems to improve (though not make perfect) the icon placement in IE6 for multiple lines:

a.ext {
  zoom: 1;
  background: url(extlink.png) right center no-repeat;
  padding-right: 12px;
}

The only difference is the "zoom" property, which seems to trigger IE's "hasLayout" property. I don't have an IE7 install I can test on at the moment.

#2

quicksketch - May 6, 2007 - 04:42
Status:needs review» needs work

My patch seems to cause odd behavior when a really long link is in the middle of a paragraph (shot attached). If you can come up with a CSS hack to make IE render the link properly I'll be glad to commit it.

AttachmentSize
Picture 3_6.png 9.2 KB

#3

marceloverdijk - July 3, 2007 - 20:50

Is there any status update on this?

Nice module indeed.

#4

TfR75 - September 14, 2007 - 14:55

Yes, it is a very nice module, but we I too have the problem with displaying links that wrap onto the second line - only in IE (7), not in Firefox (2) or Opera (9.2).

#5

BENNYSOFT - October 25, 2007 - 21:58

Can the placement of the icon before the link fix this problem? I would prefer this option in general. That would fix the (optical) problem with ®, , and 's after/outside the link. I can post this as a feature request, too.

#6

aether - June 5, 2008 - 20:17

My solution was to append an (admittedly hackish) empty span to the end of the link and apply the graphic to that. Seems to resolve the positioning issues in IE6+. I have attached a patch against 5.x-1.6 for anyone interested.

AttachmentSize
extlink-132614-6.patch 2.07 KB

#7

quicksketch - June 5, 2008 - 23:58
Status:needs work» needs review

Interesting! This looks like it might be a good approach! Marking code needs review to remind me to take a look. Any interested users, please also test and see if this looks like a valid approach.

#8

quicksketch - June 7, 2008 - 01:56

This version of the patch works a little bit better, and should break less installations for those people upgrading.

- The "ext" class is still kept on the link itself, but it's also added to the span that is appended. The CSS is just specifically targeted to the span.ext class.
- The span is only appended if the link is being displayed inline. This keeps the external icon from showing up on a new line after links that might be in the menu ULs or on links that have image replacement in place.

AttachmentSize
extlink_ie_wrap.patch 2.63 KB

#9

aether - June 10, 2008 - 18:03

Thoughtful additions. I'll be using #8 on a new project in the next few days. Thanks.

#10

haroldb - September 11, 2008 - 21:54

thanks , it works for me too

#11

rgracia - September 29, 2008 - 15:18

Subscribing to see when a new version with this fixed is made available. I have no clue how to patch modules unless downloading a replacement version.

#12

rgracia - September 29, 2008 - 16:04

Can I get this patched version as a full module zip?

#13

quicksketch - September 30, 2008 - 01:58
Status:needs review» fixed

I've gone ahead and committed the patch in #8, so you don't have to worry about patching it now. You can download the fully patched, latest version from the releases page. Go to http://drupal.org/project/extlink, click "View all releases", and find the 5.x-1.x-dev version (or 6.x version if you're using Drupal 6).

I won't roll out a new release until a whitelist is implemented, as this new approach makes exempting certain links more difficult than it was previously.

#14

rgracia - September 30, 2008 - 14:25

Thanks. Will test today and report back.

Editing to report that unfortunately I am still getting the same behavior in IE7. Still will continue to watch this topic for a future solution. Thanks again.

#15

Anonymous (not verified) - October 14, 2008 - 14:32
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#16

rgracia - October 16, 2008 - 14:19

This still doesn't work on IE 7, FYI. Maybe there's nothing else you can do about it but if that's the case the module documentation should mention that it does not work properly on IE7.

#17

haroldb - October 16, 2008 - 22:07

@rgracia: I'm using IE7, and it does work for me.

#18

ramsey85 - March 14, 2009 - 01:06

Does anybody have solution for zoom:1 not validating for CSS? Is their any other option other than using zoom

#19

ramsey85 - March 14, 2009 - 01:18

.extlink-wrapper{
position: relative;
width: 12px;
margin: 0 12px 0 0;
}

ADD THE EXTRA SPAN AND NOW IT VALIDATES!!!!

 
 

Drupal is a registered trademark of Dries Buytaert.