Problem/Motivation

During installation in all browsers the "Default country" dropdown element overflows or is wider than other elements and touches the edge of the installer container. This occurs at 769px and up, until the dropdown element "fits" in the install container.
See the following screenshots, I have annotated them with browsers and operating systems they belong to.


 
 

 
 

 
 

 
 

 
 

 
 

 
 

Proposed resolution

Create a fix to contain the dropdown element in the installer box and keep it inline with the widths of other elements on the page.
Take into consideration that some countries have a long length and that we do not know if longer country names will be added in the future.

Remaining tasks

Review the most recent patch in this issue.
Does it fix the problem? What do really long country names look like?
Fix patch - Remove changes in the patch not relevant to this issue.
Manual testing of pages with select boxes - the patch affects select boxes everywhere in Seven.
Add screenshots to show any visual regressions or if everything is fine.
Add a review comment to this issue.

User interface changes

Not applicable

API changes

Not applicable

Original report by krueschi

When installing the system asks for website information and admin user information.
The fieldsets therefore run out the light colored foreground into the blue background on the right.
Up until now I've testet only the installer in German.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because long select inputs escape their containers width
Unfrozen changes Unfrozen because it only changes layout presentation
CommentFileSizeAuthor
#62 IE9-3.png311.05 KBemma.maria
#62 IE9-2.png279.87 KBemma.maria
#62 IE9.png307.69 KBemma.maria
#62 firefox-2.png629.45 KBemma.maria
#62 firefox.png328.62 KBemma.maria
#62 BackstopJS-Report-selects.pdf1.85 MBemma.maria
#62 default-country-max-width-2227121-62.patch483 bytesemma.maria
#58 IE11.png76.89 KBJill L
#58 IE10.png51.42 KBJill L
#58 IE9.png25.29 KBJill L
#58 Chrome.png76.79 KBJill L
#58 Safari.png75.45 KBJill L
#58 opera.png82.44 KBJill L
#58 firefox.png112.63 KBJill L
#55 default-country-max-width-2227121-55.patch397 bytesDickJohnson
#53 content-list-553.png65.89 KBDickJohnson
#53 content-list-788.png75.2 KBDickJohnson
#53 content-list-1025.png50.57 KBDickJohnson
#49 FF dropdown.png242.38 KBemma.maria
#49 Chrome dropdown.png271.97 KBemma.maria
#49 IE11_patch.png304.95 KBemma.maria
#49 IE10_patch.png298.93 KBemma.maria
#49 IE9_patch.png203.61 KBemma.maria
#49 FF_Windows_patch.png316.45 KBemma.maria
#49 Chrome_Windows_patch.png285.29 KBemma.maria
#49 Safari_OSX_patch.png250.14 KBemma.maria
#49 Firefox_Osx_patch.png356.29 KBemma.maria
#49 Chrome_OSX_patch.png354.65 KBemma.maria
#48 IE11.png173.04 KBemma.maria
#48 IE10.png207.46 KBemma.maria
#48 IE9.png118.01 KBemma.maria
#48 Chrome_Windows.png228.93 KBemma.maria
#48 Firefox_Windows.png170.08 KBemma.maria
#48 Safari_OS_X.png149.19 KBemma.maria
#48 Firefox_OS_X.png177.86 KBemma.maria
#48 Chrome_OS_X.png230.31 KBemma.maria
#46 firefox1366_patch.png42.7 KBVally79
#46 firefox1024_patch.png59.15 KBVally79
#46 firefox800_patch.png31.26 KBVally79
#46 chromium1366_patch.png49 KBVally79
#46 chromium1024_patch.png55.06 KBVally79
#46 chromium800_patch.png36.26 KBVally79
#46 firefox1366.png41.74 KBVally79
#46 firefox1024.png48.4 KBVally79
#46 firefox800.png37.71 KBVally79
#46 chromium1366.png49.37 KBVally79
#46 chromium1024.png48.68 KBVally79
#46 chromium800.png37.96 KBVally79
#43 Safari PC2.png652.33 KBemma.maria
#39 interdiff-default-country-max-width-2227121-34-39.txt1.25 KBrootwork
#39 default-country-max-width-2227121-39.patch896 bytesrootwork
#38 interdiff-default-country-max-width-2227121-34-38.txt1.25 KBrootwork
#38 default-country-max-width-2227121-38.patch897 bytesrootwork
#36 saf.517.780px.png183.27 KBericxb
#34 default-country-max-width-2227121-34.patch834 bytesseiplax
#31 password-strength-bar-2227121-31.patch477 bytesByronNorris
#30 Configure site | password strength 925px.jpg79.56 KBDickJohnson
#30 Configure site - password strenght 915px.jpg105.92 KBDickJohnson
#30 Configure site - default country 700px.jpg135.51 KBDickJohnson
#25 Configure site | Drupal 2014-07-04 14-58-24 2014-07-04 14-58-32.jpg244.1 KBDickJohnson
#25 drupal8-fix_installer_display_fieldsets_right_margin-2227121-25.patch1.65 KBDickJohnson
#25 Configure site | Drupal 2014-07-04 14-45-22 2014-07-04 14-45-24.jpg37.05 KBDickJohnson
#24 password-strength.png43.53 KBjamesquinton
#24 drupal8-fix_installer_display_fieldsets_right_margin-2227121-24.patch1.07 KBjamesquinton
#23 drupal8-fix_installer_display_fieldsets_right_margin-2227121-23.patch583 bytesjamesquinton
#20 pass2.png25.94 KBalexpott
#20 pass1.png21.49 KBalexpott
#19 firefox_28_768px.png292.47 KBfrankfarm
#19 firefox 28 at 768px.png292.47 KBfrankfarm
#18 firefox 28, 768px.png292.47 KBfrankfarm
#16 screenshots.zip3.18 MBfrankfarm
#9 drupal8-fix_installer_display_fieldsets_right_margin-2227121-9.patch951 bytesRajendar Reddy
#7 drupal8-fix_installer_display_fieldsets_right_margin-2227121-7.patch953 bytesRajendar Reddy
drupal8_installscreen_fieldwidth.png55.34 KBkrueschi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

krueschi’s picture

Priority: Normal » Minor

Tested the install process in (untranslated) English and the fields are to long too.

krueschi’s picture

Some more testing done and this issue seems to be only relevant for Firefox 28 (on Windows and maybe older versions).

Not affected:

  • Chrome (33, reported as latest at the time)
  • IE (11 (32bit) on Win7, 64bit not tested)

So maybe it's not a Drupal bug?

lauriii’s picture

For some reason input's doesn't have any effect when using max-width property. I applied a patch to Firefox issue queue ( https://bugzilla.mozilla.org/show_bug.cgi?id=988965 ).

krueschi’s picture

Thanks.
Do you think we can close this issue as "works as designed" (as the error is not Drupal but FF specific) ?

lauriii’s picture

I dont know if we should create a workaround for this. Inputs on Firefox does respect width setting, so should we use that on the installation form?

krueschi’s picture

I'm curious about that its not occuring on the db settings form. Only the website config form elements are not properly sized.

Rajendar Reddy’s picture

Assigned: Unassigned » Rajendar Reddy
Status: Active » Needs review
FileSize
953 bytes

fieldsets are overlapping into the blue color background because input elements are missing the width property. If I set the width to the input elements issue is resolved. I am facing this issue even in Chrome 33 when device width is 768px. We have to override the input elements in this form( i.e., install-configure-form) except password type.

Status: Needs review » Needs work
Rajendar Reddy’s picture

Status: Needs work » Needs review
FileSize
951 bytes

Submitting the patch again.

emma.maria’s picture

Issue tags: +CSS, +frontend, +Novice
emma.maria’s picture

Assigned: Rajendar Reddy » Unassigned
dervishmoose’s picture

  1. +++ b/core/modules/user/css/user.module.css
    @@ -21,7 +21,6 @@
     .password-strength {
    -  width: 13em;
       float: right;  /* LTR */
     }
    

    At this breakpoint what if we do a width:50%, rather than removing the width?

  2. +++ b/core/themes/seven/style.css
    @@ -830,6 +830,13 @@ select.form-select {
    +.install-configure-form input.form-text,
    +.install-configure-form input.form-email {
    +  width: 100%;
    +}
    +.install-configure-form input[type="password"] {
    +  width: auto;
    +}
    ...
     input.form-email:focus,
     
    

    This is addition introduces another issue at smaller screen size where the screen is less than 600px.

dervishmoose’s picture

Status: Needs review » Needs work
jimlockett’s picture

I tested with Firefox 29.0.1 in (untranslated) English there was no problem with the fieldsets right margin

dervishmoose’s picture

Issue tags: +responsive
frankfarm’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
3.18 MB

In Chrome 35.0.1916.114 and in Firefox 29.0.1 and in Firefox 28.0 on Mac 10.9.3 when testing the patch in #9 in English this problem does not appear at screen widths of 320px, 480px, 640px, 768px, and 1024px. (See attached screenshots.)
In all of these browsers on Mac 10.9.3, at all the aforementioned browser widths, the inputfields have width:100%. However, at 768px wide the element called main has width:65% and this container constrains the widths of the inputfields enough to prevent the problem.
It's not clear to me that this issue needs more work, so I'm changing this from needs work to reviewed and tested by the community. Do we need to test older than Firefox 28? Do we need to test other languages?

frankfarm’s picture

Issue summary: View changes

Added issue summary

frankfarm’s picture

Issue summary: View changes
FileSize
292.47 KB

Added sample image of Firefox 28.

frankfarm’s picture

Issue summary: View changes
FileSize
292.47 KB
292.47 KB

Realized that image embed doesn't work with weird characters, so I had to reupload one image with a different filename.

alexpott’s picture

FileSize
21.49 KB
25.94 KB

#12 seems to suggest there are issues with the patch and manually testing has revealed a regression on the account edit screen.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

So needs work.

jamesquinton’s picture

Assigned: Unassigned » jamesquinton

Assigning myself.

jamesquinton’s picture

Assigned: jamesquinton » Unassigned
Status: Needs work » Needs review
FileSize
583 bytes

Fixes #20 and tested the install screen with the latest Firefox which is OK - the password indicator bumps down under the field and does not break the layout.

jamesquinton’s picture

Updated patch for layout fix at 600px breakpoint - password indicator was nudging against password input.

Still an issue at 995px for around a 10px range, where the the password indicator bumps down, but it is still floating right (screenshot attached). This container can't be any smaller, or the indicator copy will spread onto 2 lines.

So I guess the options are:

  • Reduce the size of the password field to 24, from 25
  • Increase the breakpoint
DickJohnson’s picture

It could be also smaller than 24. 18 it's about same size than what it looks like in Chrome or other browsers.

After changes there's still a visual bug with Firefox. When field has something to notice the shadow around the box is not showing on left. Issue has been created #2297889: On configure site form fieldsets should have small padding Password shadow

As attachment patch with stuff from #24 and changed field size.

Fixed password field size

DickJohnson’s picture

Started to think if most of stuff from #24 should be moved to install-page.css instead of style.css?

emma.maria’s picture

Status: Needs review » Needs work

Yes the install page styles need to be in install-page.css where the existing styles are.

I am going to do some fresh testing, the styling of things like the password strength have radically changed since this issue was last worked on.

emma.maria’s picture

Issue tags: +Drupalaton 2014
DickJohnson’s picture

Just ran test on "configure site" page with Firefox, Chrome, Safari and IE. It's looking relatively nice on mobile, pad and normal screen. There's few minor issues.

Default country between 699px and 705px on Firefox is not staying inside the white area. On Safari that's something like between 698px and 715px.

The password strength colour bulk is full width between 699px and 920px when it's same width with the password box in all other widths.

Browsers used:
Chrome Versio 36.0.1985.125
Safari Versio 7.0 (9537.71)
Firefox Versio 31.0
IE 10

DickJohnson’s picture

Forgot images. On first Safari Default country at 700px. Seond is Password strength on 915px and last on 925px.

Default country

Password strength 915px

Password strength 925px

ByronNorris’s picture

I also noticed the progress bar css triggered between (max-width: 1010px) and (min-width: 48em) shifts the progress bar to 100% when working on "Password strength: Strong" wraps onto a second line. I've attached a patch to the seven theme to fix the progress bar.

DickJohnson’s picture

Patch on #31 is fixing the issue with progress bar. Tested with IE, Firefox, Chrome and Safari.

The issue with "default country" is a bit trickier as width for the box is based on longest country name which is "South Georgia and the South Sandwitch Islands". I think we could drop few letters away by theming as everyone should understand it anyways. Or?

seiplax’s picture

Assigned: Unassigned » seiplax
Issue tags: +FUDK
seiplax’s picture

Assigned: seiplax » Unassigned
Status: Needs work » Needs review
FileSize
834 bytes

Confirming that the patch in #31 works as intended on Chrome, FF and Safari. It also has moved the CSS to install-page.css as mentioned in #27

The default country bug also exists on Chrome.

Talked with emma.maria and lewis.nyman about changing the breakpoint, but when testing this the new breakpoint would be 831px - up from current 768px. This is still not a guarantee that some country names with translations will not need a different breakpoint.

We decided to go with a max-width on the select element anywhere it is displayed so that it would behave the same way everywhere, as this then prevents the need to fix it in multiple locations.

Submitting patch for testing that also contains a merge of the patch in #31.

ericxb’s picture

Assigned: Unassigned » ericxb
ericxb’s picture

Assigned: ericxb » Unassigned
Status: Needs review » Needs work
FileSize
183.27 KB

Confirmed issue exists in Safari 5.7.1 on Windows.
Could not repeat issue in Chrome 37.x.
Attempted to apply patch, but paths in themes/seven/css have changed since patch #34 was submitted.
hunk 1 should now be applied to themes/seven/css/theme/install-page.css
hunk 2 should now be applied to themes/seven/css/components/form.css

LewisNyman’s picture

Issue tags: +Needs reroll, +Amsterdam2014
rootwork’s picture

rootwork’s picture

jhedstrom’s picture

Are folks here agreed on this approach?

emma.maria’s picture

emma.maria’s picture

Title: Fix installer display fieldsets right margin » Form elements overflowing installer container at certain widths.
Component: CSS » Seven theme
Priority: Minor » Normal
Status: Needs review » Needs work
emma.maria’s picture

FileSize
652.33 KB

The original issue is still occurring in Safari 5 on PC see screenshot.

Also the most latest patch only has changes for select elements and not inputs as well. It looks like the patches have lost focus as there are 3 different ones in this issue focusing on different things.

I will update the issue summary with a plethora of screenshots tonight and clearly show what needs to be fixed where so we can create 1 patch and fix this issue finally.

LewisNyman’s picture

I don't think we need to support Safari 5 anymore, Apple doesn't update Safari on PC anymore

Looks like we need to update the issue summary to show we are only fixing the select box.

Vally79’s picture

I'm making screenshots on ubuntu 14.04 LTS.

Vally79’s picture

Working fine on Chromium 39.0.2171.65 and Firefox 33.0 before patch on 1366x768, 1024x768 and 800x600.
Wrongly displaying the "email adress" text and not showing the box at all only on Firefox 1024x768 after applying the last patch.before the patch

after the patch

emma.maria’s picture

Let's get this issue organised!

I am testing:
Mac - Chrome, FF, Safari
Windows - Chrome, FF, IE9
and creating screenshots for the browsers that have bugs.

I will update the issue summary and title to reflect what I find.

The FF issue in #46 with the email address title happens on every OS but only in Firefox. It's not linked to what this issue is trying to be so I am going to split it out here... #2392487: The email address field title moves up next to password fields at 768px to 1010 px - Firefox only.

emma.maria’s picture

Title: Form elements overflowing installer container at certain widths. » The "Default country" dropdown element overflows the installer container at certain widths.
Issue summary: View changes
FileSize
230.31 KB
177.86 KB
149.19 KB
170.08 KB
228.93 KB
118.01 KB
207.46 KB
173.04 KB
emma.maria’s picture

Review of patch in #39.

The most recent patch in #39 contains a fix for the Default country element which works well and was agreed by others in #34 that we should go about it in that way.

This patch does also removes code for the password fields which I think should not be part of the patch anymore? Second opinion needed!

I applied the patch and took screenshots for all the browsers that I used to find the before patch bugs in the Issue Summary, here are my findings.


 
 

 
 

 
 

 
 

 
 

 
 

 
 

 
 
It looks good everywhere!

The dropdown element now stays at a consistent max width and matches the sizes of elements below and above it.
I used the longest country in the list to demonstrate that it keeps it's width.
The country name selected in the box is cut off in extreme cases. But I think this is OK, nothing is selected in the dropdown when the page is loaded and you can easily view the whole length of the countries in the dropdown list in any browser see below...


 
 

 
 
I think this is acceptable usability. Tagging with +Needs usability to get further opinions.

emma.maria’s picture

Status: Needs work » Needs review
DickJohnson’s picture

I think this is the best approach around, as other options are changing the width of whole layout or trying to put the country name to two lines. Two lines does not really compute on this kind of element and changing whole layout because of one country with extraordinary long name sounds like too much of work.

LewisNyman’s picture

Status: Needs review » Needs work
Issue tags: -Needs usability review +Needs manual testing

Good work! Almost there.

  1. +++ b/core/themes/seven/css/components/form.css
    @@ -185,7 +185,9 @@ textarea.form-textarea {
    +select {
    +  max-width: 100%;
    +}
    

    Because this code affects every select element in Seven, we need to verify that it doesn't break any other pages. A few suggestions of complex uses of slect elements would be field formatter settings in the field ui and exposed filters in the content listing view.

  2. +++ b/core/themes/seven/css/theme/install-page.css
    @@ -34,10 +34,6 @@
     @media all and (max-width: 1010px) and (min-width: 48em) {
    -  .install-page .password-strength,
    -  .install-page .confirm-parent {
    -    width: 100%;
    -  }
    

    These lines don't affect select elements, so I don't think we should remove them here.

DickJohnson’s picture

No issues on content listing page on on field formatter page. Field formatter page has some issues when were on firefox and screen that is below 500px, but that exist also without the patch.

Few screenshots as attachments. Tested on OSX with Safari, Chrome and Firefox.

emma.maria’s picture

Issue summary: View changes
DickJohnson’s picture

Status: Needs work » Needs review
FileSize
397 bytes

New patch around, with the changes LewisNyman suggested.

emma.maria’s picture

Issue tags: +Needs screenshots
Jill L’s picture

Assigned: Unassigned » Jill L
Jill L’s picture

FileSize
112.63 KB
82.44 KB
75.45 KB
76.79 KB
25.29 KB
51.42 KB
76.89 KB

I tested across several browsers...looks great in all of them. Screenshots are attached.

I tested in*
Chrome 39.0.2171.99
Firefox 29.0.1
Safari 7.1
Opera 26.0.1656.60
IE 9
IE 10
IE 11

Jill L’s picture

Assigned: Jill L » Unassigned

I'm not sure what the next step is here. RTBC?

joelpittet’s picture

Status: Needs review » Needs work
Issue tags: -Needs manual testing, -Needs screenshots

Thank you @Jill L, I think the next step would be to put a helpful comment above the css, as it's not clear that this selector is meant to fix that kind of problem and may be accidentally removed if nobody knows what it does.

Other than that, RTBC, yes:)

emma.maria’s picture

Issue tags: -Amsterdam2014 +Amsterdam 2014, +Needs screenshots

Thanks @Jill L the screenshots are fab.

The code in this fix targets every select in the theme so it's important to check we are not breaking other things elsewhere. Therefore we need to add screenshots of other select elements elsewhere to be sure and then this issue can be set to Rtbc :)

emma.maria’s picture

Status: Needs work » Needs review
Issue tags: -Needs screenshots
FileSize
483 bytes
1.85 MB
328.62 KB
629.45 KB
307.69 KB
279.87 KB
311.05 KB

I went through Seven and found instances of Select elements in the following places...

/admin/config/regional/settings
/admin/config/services/rss-publishing
/admin/content/comment
/admin/content/
/admin/config/search/pages
/admin/config/development/logging
/admin/config/media/file-system
/admin/config/development/performance
/node/add/page
/admin/config/system/cron

None of them looked broken. They all had the width of the longest item they contained, nothing was cut off. None of them relied on a set width bigger than 100%.

I ran CSS regression tests for all of these pages to check between head and the patch applied, which you can look at in the attached file.

I also took a look at these pages in IE9 and Firefox and found no issues.
Here are some examples...

Firefox


 

IE


 

 

 
I also went through other pages of the installer containing selects and found no issues.

I have added the comment to the CSS file.

/**
 * Limits extra long instances of select elements to the max width allowed
 * to avoid breaking layouts.
 */

Phew a big review for one line of code! The work in the patch in #55 is RTBC as far as I can see, I just need someone to RTBC the comment I added.

Also note the screenshots for the install page for the country select item are found in #58.

joelpittet’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@emma.maria, sometimes the smallest changes effect the most things. Thank you for the comment explaining it's purpose so it doesn't get regressed easily and checking in other places.

I'm confident this change does what is needed.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

CSS changes are not subject to beta evaluation. Committed 64042b0 and pushed to 8.0.x. Thanks!

  • alexpott committed 64042b0 on 8.0.x
    Issue #2227121 by emma.maria, Vally79, DickJohnson, Jill L, frankfarm,...

Status: Fixed » Closed (fixed)

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

YesCT’s picture

Issue tags: -Amsterdam 2014 +Amsterdam2014

changing to the more commonly used tag, so I can delete the one lesser used