Bootstrap: v4 form input issues

Created on 12 Aug 2017  路  24Comments  路  Source: twbs/bootstrap

Two separate issues noticed on Windows 10, in Chrome 60, Firefox 54.0.1, Edge 38. I noticed these in the docs

  1. A <select class="form-control form-control-lg"> needs more height
    screenshot 2017-08-11 09 58 12

  2. Text color is inconsistent between a disabled input vs. select
    screenshot 2017-08-11 10 01 06

css v4

Most helpful comment

@Johann-S
https://output.jsbin.com/moyujufara
on latest firefox win 10

All 24 comments

I came to report this. For select element below styles might update as below...

Base Style for form-control-lg

.form-control-lg, .input-group-lg>.form-control,
.input-group-lg>.input-group-addon,
.input-group-lg>.input-group-btn>.btn {
    padding: 0.6rem 1rem; /* updated */
    font-size: 1.15rem; /* updated */
    line-height: 1.4; /* updated */
    border-radius: .3rem;
}

height update for form-control

select.form-control:not([size]):not([multiple]) {
    height: calc(2.45rem + 2px);
}

height update for form-control-lg

.input-group-lg>.input-group-btn>select.btn:not([size]):not([multiple]),
.input-group-lg>select.form-control:not([size]):not([multiple]),
.input-group-lg>select.input-group-addon:not([size]):not([multiple]), select.form-control-lg:not([size]):not([multiple]) {
    height: calc(3.1rem + 2px);
}

System Details --

Win 7
Chrome - 59.0.3071.115

Above changes update the controls as below.
image

Not only the select, also the input, under line glyphs does not display correctly
g

Bug reports must include a live demo of the problem. Per our contributing guidelines, please create a reduced test case via JS Bin or CodePen and report back with your link, Bootstrap version, and specific browser and OS details.

@Johann-S
https://output.jsbin.com/moyujufara
on latest firefox win 10

Regular <select>s are also cutoff https://jsbin.com/sixiqaruxe/edit?html,output

Firefox 55/Linux cuts the input with the standard 1.25 line-height. Here an example of a number field:

bootstrap_4b_input_lineheight125

Setting the line-height slightly higher to 1.35 fixes the issue:

bootstrap_4b_input_lineheight135

Stop closing issues that haven't been addressed or even mentioned in regards to fixing.

@kjdion84 please look at what is being closed, what is being kept open, and what's being cross-referenced and consolidated as a single issue (in this case, THIS one). all you're doing now is generating more noise for people to wade through.

Having fundamental issues such as text being cutoff in every single <select> is worth generating more noise about because its ridiculous that this hasn't been fixed yet.

you seem to misunderstand the idea of how open source run by volunteers works. feel free to send a pull request with fixes.

Note that this problem can be reproduced with free Windows virtual machines from Microsoft, see https://github.com/twbs/bootstrap/issues/23769#issuecomment-331377830

Note I believe the issue of height cut off was fixed by https://github.com/twbs/bootstrap/pull/23150 as there is a bug with the form-control-lg height in the current beta (which the above examples are using). I'm afraid it's quite hard to work this out from the git history though. [EDIT: that only refers to the main issue with -lg, default ones are still cut-off.]

The padding issue of #24043 (marked as duplicate of this) is still present in current v4-dev. This has a couple of parts:

  • Options have a little bit of unremovable magic left padding in Chrome, Firefox, (maybe Safari?);
  • Padding on select is e.g. ignored on desktop Chrome and Safari (but is followed in Firefox), and (sort of) honoured on Android Chrome.
    So the left padding needs to be 3px(?) less for selects than inputs in order to align with text inputs, except it still won't in desktop Chrome/Safari as they ignore it whatever it is. The only way everything could always line up would be if the left-padding was fixed, at whatever size, at whatever desktop Chrome/Safari are using as their unchangeable value.

already fixed with our last dist files see for the <select> : https://codepen.io/Johann-S/pen/MEpBdR

It isn't fixed properly. The issue still exists for even normal selects in Chrome on Windows. Characters are still being cut off as the text is still not centered vertically properly.

Proof fiddle: https://codepen.io/anon/pen/WZpPPp
Proof image:
Imgur

On IE11 on Windows, a <select class="custom-select"> is fine, whereas <select class="form-control"> is cut off. The custom-select has less top/bottom padding, but the same height. The padding on custom-select leaves 1.5rem for the text, the form-control leaves 1.25rem.

Can y'all test out the changes in #24199?

24199 looks good! Tested with latest DEV Bootstrap version.

W7 and IE11:
w7_ie11

W7 and Chrome:
w7_chrome

There is one problem in DEV Bootstrap version:

Windows 7, Internet Explorer 11, see different input and input-group-addon height
w7_ie11

It works fine in latest Chrome and Firefox. Should I report it as a separate issue?

  • #24199 does fix the default form-control being cut off at the bottom, yes :-)
  • The disabled text colour being different for inputs/selects (original issue part 2) is still present
  • The left-padding being different for different controls (#24043, closed as a dupe of this) is still present, but as I commented at https://github.com/twbs/bootstrap/issues/23347#issuecomment-332493174 it doesn't really sound easily fixable.

Thanks!

(@jrysig, my personal suggestion would be yes to a separate issue, makes it easier to track.)

@mdo it looks much better and also scales well with -lg. Please merge ASAP.

@jrysig That should be fixed as of #23810.

@josephzidell @dracos The different text color is because the <input> is using a placeholder vs the select menu showing an <option>. Selects don't support placeholder attributes.

@mdo Makes sense! The original text of this issue is fixed, therefore, yes, the only issue is the left padding.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cvrebert picture cvrebert  路  3Comments

MrCsabaToth picture MrCsabaToth  路  3Comments

fohlsom picture fohlsom  路  3Comments

devdelimited picture devdelimited  路  3Comments

devfrey picture devfrey  路  3Comments