-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Placeholder text is clipped on Firefox #851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
My experience is the opposite, I see the problem in Chrome, not in Firefox. Perhaps it depends on the chosen theme (Bootstrap 3 in my case) or the used font. |
@PhiLhoSoft I'm using the Bootstrap 3 theme as a base as well so we have cross over there. Nice thought on the workaround, I'll go with that until there's a fix. cheers! |
To be solved properly when selectize/selectize.js#851 is resolved Reviewed in-person by Julian git-svn-id: https://svn.forgerock.org/openam/trunk@14682 0f4defcf-c51a-4c67-9f44-6fb5eba73c5d
This bug is reproducible on IE 11 also. This fixed it for me:
|
In the measureString function I changed the width value from 'auto' to '100%' and that worked. |
+1 @addzies Adding 100% solves the problem only if your selectize is well placed in proper columns (bootstrap grid etc.). With 100% width when the The problems seems to be +4 in the call after 4 pixels are not nearly enough after the initial space that browsers add to the placeholders in the input. |
Looks like we'd need something more reliable for autogrow than "oh, let's add N pixels here" |
Was running into this issue and it was related to the styles on the input inside selectize:
The above resulted in clipping 20px. The padding isn't needed and when it's added on render throws off the width of the input depending on your box model. |
Same issue but resolved it by setting the This fixed it for me: .selectize-input {
input[placeholder] {
box-sizing: initial;
}
} Because the width calculator is not keeping track of already existing paddings and/or detecting the |
Some problem here. MacOS + Google Chrome 55.0.2883. Using Bootstrap 3 and these styles for placeholders in inputs: ::-moz-placeholder {
color: #aaa;
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
font-family: 'WorkSans Light', sans-serif;
text-align: center;
text-transform: uppercase;
}
:-ms-input-placeholder {
color: #aaa;
font-family: 'WorkSans Light', sans-serif;
text-align: center;
text-transform: uppercase;
}
::-webkit-input-placeholder {
color: #aaa;
font-family: 'WorkSans Light', sans-serif;
text-align: center;
text-transform: uppercase;
} Solution.selectize-input:not(.has-items) input {
text-align: center;
width: 100% !important;
} BeforeAfter |
Thank you @kniziol! I used your solution but changed the placeholder colors to |
|
Hello, Do check the blog post for supported CSS properties on placeholders. https://blog.ajcw.com/2011/02/styling-the-html5-placeholder/ |
I my case, I use Turbolinks, which replaces
to make it add the |
On Firefox 39 OS X (not tested on earlier versions of FF) the placeholder text is initially rendered too small and clips trailing characters. This only happens on FF, Chrome and Safari work as expected.
After selecting the control and deselecting, the placeholder expands and is no longer clipped.
The text was updated successfully, but these errors were encountered: