Last modified: 2010-05-15 16:03:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T15875, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13875 - Empty diffs appear as long columns of text when viewed in Safari
Empty diffs appear as long columns of text when viewed in Safari
Status: RESOLVED DUPLICATE of bug 21053
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.13.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/w/index.php?t...
:
: 17721 17803 (view as bug list)
Depends on:
Blocks: css
  Show dependency treegraph
 
Reported: 2008-04-29 10:42 UTC by Titoxd
Modified: 2010-05-15 16:03 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshot of affected page (157.71 KB, image/png)
2008-04-29 10:45 UTC, Titoxd
Details
Screenshot of behavior in Firefox 3.5 (66.31 KB, image/png)
2010-01-10 16:38 UTC, Derk-Jan Hartman
Details

Description Titoxd 2008-04-29 10:42:56 UTC
The right-hand side of the diff headers' output (where the user who made the edit, as well as his/her talk page, contributions, etc) in the Modern skin is sometimes heavily compressed when seen in Safari v3.0 and higher in Mac OS X. This bug does not occur all the time, but the page linked in the bug description shows an example of one time it does occur.
Comment 1 Titoxd 2008-04-29 10:45:45 UTC
Created attachment 4849 [details]
Screenshot of affected page
Comment 2 Brion Vibber 2008-04-29 21:35:23 UTC
Updated summary -- it's not just Modern skin, it's any skin. Only affects diffs that show no changes (such as on a move or protection log entry).

Tested w/ Safari 3.1 on Mac OS X 10.5.
Comment 3 PieRRoMaN 2008-08-23 13:29:49 UTC
I also have the same problem with Safari 3.1.2 on Windows Vista, with default skin.

There's a screenshot of the diff from the user who pointed out the bug to me: http://fr.wikipedia.org/wiki/Image:Nanoxyde1.jpg
And a link to the diff: http://fr.wikipedia.org/w/index.php?title=La_Mort_de_l%27incroyable_Hulk&diff=next&oldid=29835762
Comment 4 Bruno 2008-10-04 04:11:40 UTC
ok, here is a temporary solution to the problem.  copy the following code into your monobook.css page:

table.diff {
	table-layout: auto ! important;
}
table.diff td.diff-ntitle,td.diff-otitle {
	width:50% ! important;
}

this might cause table expansion with ling URL names, but at least you'll be able to read the URLs.

The problem, as far as I can figure out, is that when Safari sees a table with (a) 'table-layout:fixed', (b) defined columns, (c) a colspan property on the last table cells in the first row, and (d) no data in the last cell of any of the other rows, it gives the colspaned cell the width defined in the first column.  in our case here, col 3 is for the +/- checkmarks and is preset to 2% of the table width, so Safari s trying to choke what should be going into a 50% colspan=2 cell into 2% of the space.

Needless to say, I'll report this to apple, but if anyone can find a more permanent solution...  
Comment 5 Bruno 2008-10-04 20:53:32 UTC
better solution - delete the above addition from monobook.css, and add the following code to your monobook.js page:

<pre>addOnloadHook( function() {
	var url = document.URL;
	if ( url.search(/&diff=/) == -1 ) return;
	var tbody = document.getElementsByTagName("TBODY")[0];
	var row = document.createElement("TR")
	var td = new Array
	for (i=0; i<4; i++) {
		td[i] = document.createElement("TD")
		td[i].appendChild(document.createTextNode(""))
		row.appendChild(td[i]);
	}
	tbody.appendChild(row);
} );</pre>

it adds a dummy row at the bottom of the diff table that straightens everything out.
Comment 6 Platonides 2008-10-04 20:56:31 UTC
If adding an empty row fixes the diff for safari, it may well be added to mediawiki.
Comment 7 Ilmari Karonen 2008-10-05 19:41:50 UTC
A simpler fix yet may be just to replace "<td colspan="2">&nbsp;</td>" in diff output with "<td>&nbsp;</td><td>&nbsp;</td>".  There's no real gain from using colspans there.
Comment 8 Bruno 2008-10-05 21:47:34 UTC
well, I think the colspans in the first line are so that the revision headers center properly (otherwise they'd center in cells 2 and 4, which would make them appear slightly skewed to the right because of the 2% width of cells 1 and 3).  not a huge issue of aesthetics, but still...  

the dummy line would work, probably, though there has to be an empty text node in the cell - I think Safari treats cells with empty text nodes differently from cells with null content.  

we could also remove the HTML COL elements.  removing those would solve the problem somewhat (there's still an issue with Safari only using the width of cell 3, but at least without the COL elements it minimizes the space taken up by cell 4 and maximizes 3).  but then we'd have to code cell widths into each cell.

I love Safari, really, but on some occasions the thing is a royal pain.  :-)
Comment 9 PieRRoMaN 2009-04-22 12:20:29 UTC
The same bug occurs with Google Chrome (1.0.154.53). Another example: http://fr.wikipedia.org/w/index.php?title=Modèle:L&curid=1019424&diff=40072824&oldid=39862247

Now that more than one browser is affected by this problem, it would be a good idea to find a proper solution to it... ;)
Comment 10 Brion Vibber 2009-07-20 02:13:19 UTC
*** Bug 17803 has been marked as a duplicate of this bug. ***
Comment 11 Titoxd 2009-07-20 02:58:20 UTC
This doesn't happen with Safari 4.0.2 anymore; should this be marked as fixed, or is there a temporary hack in place?
Comment 12 PieRRoMaN 2009-07-20 12:40:51 UTC
Well, I still encounter this bug with Chrome (2.0.172.33), so the problem doesn't seem fixed at all to me.
Comment 13 Chad H. 2009-07-29 14:04:55 UTC
*** Bug 17721 has been marked as a duplicate of this bug. ***
Comment 14 Derk-Jan Hartman 2010-01-10 16:31:30 UTC
Still somewhat of a problem at times. For instance: http://en.wikipedia.org/w/index.php?title=Kamen_Rider%3A_Dragon_Knight&action=historysubmit&diff=337010287&oldid=336578750

Shows the problem in Safari and in Firefox as well (see attachment for screenshot in FF)

The problem is that on empty diffs, the col elements are not added (<col class="diff-marker"/><col class="diff-content"/><col class="diff-marker"/><col class="diff-content"/> to the table. These elements set the width required in the CSS. By setting diff-otitle and diff-ntitle to width:50%; the problem is solved.
Comment 15 Derk-Jan Hartman 2010-01-10 16:38:15 UTC
Created attachment 6946 [details]
Screenshot of behavior in Firefox 3.5
Comment 16 P.Copp 2010-01-10 16:40:29 UTC

*** This bug has been marked as a duplicate of bug 21053 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links