Last modified: 2014-04-19 16:22:55 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 T36557, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34557 - Fix uses of width: 100%; with borders
Fix uses of width: 100%; with borders
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 40610
Blocks: 34558
  Show dependency treegraph
 
Reported: 2012-02-21 05:56 UTC by Daniel Friesen
Modified: 2014-04-19 16:22 UTC (History)
6 users (show)

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


Attachments

Description Daniel Friesen 2012-02-21 05:56:48 UTC
If the content area is given an overflow a `{ width: 100%; border: 1px solid black; }` has the effect of creating a block which is always 2px wider than the space that the scrolling area can contain and hence creates a horizontal scrollbar that never disappears.

In various places we use width: 100%; and give something a border. We should fix these places by either eliminating the width: 100%; (if it's unnecessary for that area to have it), or by specifying a box-sizing: border-box; on that element (with all the fallbacks) so that the width is calculated correctly in supporting browsers.

Note that this issue does not happen with tables, so we don't need to deal with all those people put inside of WikiText. Just ui css we add.
Comment 1 Derk-Jan Hartman 2012-11-02 13:16:21 UTC
Fixed for the WikiEditor in https://bugzilla.wikimedia.org/40610
Comment 2 Rahul Maliakkal 2013-03-20 19:33:31 UTC
I have made an attempt to solve this Gerrit change #54896
Comment 3 Gerrit Notification Bot 2013-03-20 21:20:36 UTC
https://gerrit.wikimedia.org/r/54896 (Gerrit Change Iee535a5359c03c52f6b72a95807258caf7ba60ae) | Patch Set 1:

I wanted to add box-sizing to textarea before. But I believe someone brought up some things that would be messed up by that change.

And I'm not sure what the value of it on bodyContent is. [by Daniel Friesen]
Comment 4 Gerrit Notification Bot 2013-03-20 21:48:26 UTC
Related URL: https://gerrit.wikimedia.org/r/54896 (Gerrit Patch-Set: Iee535a5359c03c52f6b72a95807258caf7ba60ae/2)
Comment 6 Valerie Juarez 2013-04-02 20:03:07 UTC
> In various places we use width: 100%; and give something a border. We should
> fix these places by either eliminating the width: 100%; (if it's unnecessary
> for that area to have it), or by specifying a box-sizing: border-box; on that
> element (with all the fallbacks) so that the width is calculated correctly in
> supporting browsers.

Do Rahul's changes fix all the "various places"? Would it be helpful to list point to each place the issue exists so we can 'check off' what's done and make it more obvious as to when this report can be closed?
Comment 7 Daniel Friesen 2013-04-02 20:23:37 UTC
(In reply to comment #6)
> > In various places we use width: 100%; and give something a border. We should
> > fix these places by either eliminating the width: 100%; (if it's unnecessary
> > for that area to have it), or by specifying a box-sizing: border-box; on that
> > element (with all the fallbacks) so that the width is calculated correctly in
> > supporting browsers.
> 
> Do Rahul's changes fix all the "various places"? Would it be helpful to list
> point to each place the issue exists so we can 'check off' what's done and
> make
> it more obvious as to when this report can be closed?

Rahul's change would fix the ones related to textareas but it's almost overly broad and would create visual defects in random places we're not expecting. Such as site scripts that we can't possibly find all of and test.

For example:
# Go to https://pl.wikipedia.org/wiki/Pies_domowy
# Click on "Zgłoś błąd" in the sidebar
# Then click on "Przejdź do formularza"

See the textarea there (the big field in the middle) nice and flush with the rest of the form. Try modifying the global textarea to use a border-box box-sizing like that changeset does.

But besides that. This isn't only a matter of textareas. Other elements can also be given 100% width and borders. Like tables, and more. So even that change won't guarantee the bug is fixed.

And these can be all over the place. In core, in special pages and forms we don't use often, extensions, new features we haven't written yet.

Honestly this is almost more like one of our tracking bugs, cause to actually fix this we're going to have to find and fix these in unknown places all over.
Comment 8 Andre Klapper 2013-07-25 07:45:55 UTC
Patch still needs review...
Comment 9 Fomafix 2014-03-19 10:43:08 UTC
(In reply to Daniel Friesen from comment #7)
> For example:
> # Go to https://pl.wikipedia.org/wiki/Pies_domowy
> # Click on "Zgłoś błąd" in the sidebar
> # Then click on "Przejdź do formularza"

This should be fixed in
https://pl.wikipedia.org/wiki/MediaWiki:Gadget-wikibugs.css

.reportBugDialog input.text, .reportBugDialog textarea {
	margin-bottom: 12px;
	width: 95%;
	padding: .4em;
}

can replaced by

.reportBugDialog input.text, .reportBugDialog textarea {
	margin-bottom: 12px;
	width: 100%;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	padding: .4em;
}

Since https://gerrit.wikimedia.org/r/105207 textarea has width: 100%; box-sizing: border-box; but input needs width: 100%; box-sizing: border-box;
Comment 10 Fomafix 2014-04-18 20:12:20 UTC
#bodyContent { width: 100%; }
is removed in https://gerrit.wikimedia.org/r/120528. Is this bug fixed?
Comment 11 Gerrit Notification Bot 2014-04-19 16:20:25 UTC
Change 54896 abandoned by TheDJ:
(Bug 34557) Fixed uses of width: 100%; with borders

Reason:
This was eventually dealt with in the patch sets identified in the comments.

https://gerrit.wikimedia.org/r/54896
Comment 12 Derk-Jan Hartman 2014-04-19 16:22:55 UTC
Let's close this one. I'm sure we will have a few more spots with this, but if and when we identify them, we should probably file separate tickets for those issues.

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


Navigation
Links