Last modified: 2014-05-28 21:38:20 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 T38231, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36231 - table headers in Firefox&Chrome get left aligned when you enable "Justify paragraphs"
table headers in Firefox&Chrome get left aligned when you enable "Justify par...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
https://de.wikipedia.org/w/index.php?...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-25 07:51 UTC by Fomafix
Modified: 2014-05-28 21:38 UTC (History)
7 users (show)

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


Attachments

Description Fomafix 2012-04-25 07:51:30 UTC
On Firefox the table headers (th) gets left aligned when you enable "Justify paragraphs" in [[Special:Preferences#mw-prefsection-rendering]] or use text-align:justify for a container. On Internet Explorer the table headers keep centered.

Expected result: The table headers should always be centered.

I think this is a bug in Firefox. The table caption (caption) is in Firefox always centered as expected.

With the following CSS definition in skins/common/commonElements.css the table headers are centered by default:

th {
	text-align: center;
}


Test case:

<div style="width: 20em; float:left; margin-right:1em; border: 1px dashed silver;">
This paragraph is '''without''' <code>text-align:justify</code>.

{|
|+ Long caption of the table
|-
! th cell !! th cell with<br />two lines
|-
| td 1 || td 2
|-
| width td cell || th cell with<br />two lines
|}
</div>
<div style="text-align: justify; width: 20em; float:left; margin-right:1em; border: 1px dashed silver;">
This paragraph is '''with''' <code>text-align:justify</code>.

{|
|+ Long caption of the table
|-
! th cell !! th cell with<br />two lines
|-
| td 1 || td 2
|-
| width td cell || th cell with<br />two lines
|}
</div>
<div style="clear:left"/>
Comment 1 Sumana Harihareswara 2012-08-17 10:43:22 UTC
Thanks for the suggestion!  https://www.mediawiki.org/wiki/Git/Tutorial helps you see how to submit that as a patch so our developers can easily review it and, if accepted, merge it into our source control system.  Would you be interested in doing that?

Also, does the problem still happen with current versions of Firefox & MediaWiki?
Comment 2 Fomafix 2012-08-17 13:18:54 UTC
(In reply to comment #1)
> Also, does the problem still happen with current versions of Firefox &
> MediaWiki?

The problem still exists in Firefox 14.0.1 and in current version of MediaWiki. See testcase.
Comment 3 Fomafix 2012-09-13 19:30:47 UTC
With the additional definition th { text-align: center; } the alignment for table header cells in tables with text-align on table rows doesn't work anymore:

{|
|- style="text-align: right;"
! Head 1 !! Head 2
|-
| Table body cell 1 || Table body cell 2
|}

Without th { text-align: center; } the two table head cells get right aligned.
With th { text-align: center; } the two table head cells get centered.


wikitable has already this behavior:

{| class="wikitable" style="text-align: right;"
|-
! Head
|-
|       1
|-
|      12
|-
|     123
|-
|    1234
|-
|   12345
|-
|  123456
|-
| 1234567
|}

The table header cell is centered and the table body cells are right aligned.


When the definition

  th { text-align: center; }

in skins/common/commonElements.css gets added, the definition

  text-align: center;

for

  table.wikitable > tr > th,
  table.wikitable > * > tr > th

in skins/common/shared.css and in skins/common/commonPrint.css can be omitted.
Comment 4 Rahul Maliakkal 2013-03-24 19:52:05 UTC
Gerrit change #55517
Comment 5 Munaf Assaf 2013-04-01 17:51:13 UTC
Apologies if this sounds silly because it's a simple design change, but would you mind posting before/after screenshots of the fix?
Comment 6 Bartosz Dziewoński 2013-06-27 19:05:56 UTC
Is it still happening in recent Firefox versions?
Comment 7 Fomafix 2013-06-27 21:07:47 UTC
(In reply to comment #6)
> Is it still happening in recent Firefox versions?

Yes. With activated justify on actual Firefox and Chrome the th gets left-aligned, On Internet Explorer 8 and Opera the th gets centered.
Comment 8 Jared Zimmerman (WMF) 2013-06-27 21:16:14 UTC
technical fix only (browser compatiblity), removed design tag
Comment 9 Andre Klapper 2014-02-18 20:05:40 UTC
Patch in Gerrit needs rework. 
Unassigning from Rahul for the time being as there has not been any follow-up in Gerrit, but feel free to assign it again to you if you plan to work on this.
Comment 10 Bartosz Dziewoński 2014-02-22 02:23:13 UTC
The preference was just recently removed (bug 52810), I guess that makes this a WONTFIX.
Comment 11 Gerrit Notification Bot 2014-05-28 21:38:20 UTC
Change 55517 abandoned by Bartosz Dziewoński:
(Bug 36231) Fixed the issue of table headers getting left aligned on enabling "Justify Paragraphs"

Reason:
See bug.

https://gerrit.wikimedia.org/r/55517

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


Navigation
Links