Labels |
Added:
?
|
Category | ⇒ | com_fields |
Element style gets a fixed width of 90px.
I get the same error when I create and display a usergroup custom field for any extension.
So is this something we can solve?
Looked at the js files loaded and did not see any difference.
I could sove it locally by adding
min-width: 187px !important;
in chosen.css
in
.chzn-container-multi .chzn-choices li.search-field input[type="text"] {
margin: 1px 0;
padding: 0;
height: 25px;
outline: 0;
border: 0 !important;
background: transparent !important;
box-shadow: none;
color: #999;
font-size: 100%;
font-family: sans-serif;
line-height: normal;
border-radius: 0;
min-width: 187px !important; /// Added here.
}
I don't know of any chzn which uses in Joomla a width below 187px.
So should we add that rule to the Isis template of what is your suggestion?
It certainly would work is we add:
.chzn-container-multi .chzn-choices li.search-field input[type="text"] {
min-width: 187px !important;
}
in ROOT/administrator/templates/isis/less/chzn-override.less
and then run generatecss.php cli which will add this in isis both template css files.
But it looks like a hack to me as the issue is likely to be in the implementation of com_fields.
@Bakual @dgt41
What do you think?
I have no clue and it doesn't happen both in Firefox and Chrome her eon my Windows Laptop. So can't comment on it.
The rule certainly looks fishy as always when !important
is used.
It's certainly not related to com_fields by itself. The formfield in question is a regular list field where only the getOptions method is overriden. The hint is created by JHtmlFormbehavior::chosen
. So it should happen on each list field with multiple options allowed.
I experienced this issue as well see https://www.screencast.com/t/dDPWttlRH
The reason is that chosen.js calculates the width of the INPUT depending on the width of it's outer container.
https://github.com/joomla/joomla-cms/blob/staging/media/jui/js/chosen.jquery.js#L1340
Because somebody added in template.css of Isis an important! width of 100% for the container the INPUT width is always caclculated too small:
.control-group .chzn-container {
width: 100% !important;
max-width: 220px;
}
So: Remove the width here and find another selector to limit the width!
EDIT: I removed the whole CSS block above and the placeholder is no longer truncated and also the width is correct.
https://github.com/joomla/joomla-cms/blob/staging/administrator/templates/isis/css/template.css#L7027-L7030
Unfortunately this pr doesn't solve this issue here, the pr got merged over two months ago and we still have the issue.
Guess it is about the same thing.
Priority | Medium | ⇒ | Very low |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-04-02 05:39:03 |
Closed_By | ⇒ | franz-wohlkoenig |
If you click on it and then release it, the full text is shown. Don't know i this is a bug in the JS library @dgt41, @infograf768 any clue why this can happen.
In the meantime, I created a PR #13607 which fixes that field at all as it is broken.