Code review comment for lp:~jtv/lazr-js/bug-427263-2

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

= Bug 427263, 2nd attempt =

This is about Konqueror not rendering the edit button for the multiline inline editor. The problem is that the button contains only a sprite (which is implemented as a background image), nothing else—and Konqueror doesn't bother rendering an <a> tag with no real content.

My previous solution was to insert a zero-width non-joiner. But that approach requires parallel fixes in lazr-js and Launchpad, with the latter fix breaking lots of tests. The breakage can be fixed, but it makes all those tests a lot uglier.

This new fix is pure CSS. Turns out Konqueror does render the <a> tag if I apply an empty content attribute to its :link and :visited pseudoclasses.

As far as I can tell, the content attribute is ignored in these pseudoclasses: http://www.w3schools.com/CSS/pr_gen_content.asp (and a quick check in Firefox concurs).

If some browser should fail to ignore it, and either it lets the content attribute override the tag's dimensions or we want something else than a sprite in the tag, then we may have to go looking for a new trick. I tested in Arora, Chromium, Firefox, Galeon, and Konqueror; most Internet Explorer versions apparently don't support the content attribute in the first place, so it's not likely to cause problems there either.

Jeroen

« Back to merge proposal