?
avatar franz-wohlkoenig
franz-wohlkoenig
15 Jan 2017

Steps to reproduce the issue

"Contacts: Edit" > Tab "Display": Field "Show User Custom Field" Text inside Value is messed:
bildschirmfoto 2017-01-15 um 09 10 46

System information (as much as possible)

Joomla! 3.7.0-alpha2-nightly
macOS Sierra, 10.12.2
Firefox 50.1.0
PHP 7.0.4
MySQLi 5.5.53-0

avatar franz-wohlkoenig franz-wohlkoenig - open - 15 Jan 2017
avatar joomla-cms-bot joomla-cms-bot - change - 15 Jan 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Jan 2017
avatar laoneo
laoneo - comment - 16 Jan 2017

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.

avatar infograf768 infograf768 - change - 16 Jan 2017
Category com_fields
avatar infograf768
infograf768 - comment - 16 Jan 2017

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.

avatar laoneo
laoneo - comment - 16 Jan 2017

So is this something we can solve?

avatar infograf768
infograf768 - comment - 16 Jan 2017

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.

avatar laoneo
laoneo - comment - 17 Jan 2017

So should we add that rule to the Isis template of what is your suggestion?

avatar infograf768
infograf768 - comment - 17 Jan 2017

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?

avatar Bakual
Bakual - comment - 17 Jan 2017

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.

avatar gwsdesk
gwsdesk - comment - 8 Mar 2017

I experienced this issue as well see https://www.screencast.com/t/dDPWttlRH

avatar bertmert
bertmert - comment - 12 Mar 2017

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

avatar bertmert
bertmert - comment - 12 Mar 2017

The CSS changes have been made here by @ciar4n
#13586

avatar laoneo
laoneo - comment - 13 Mar 2017

Unfortunately this pr doesn't solve this issue here, the pr got merged over two months ago and we still have the issue.

avatar ciar4n
ciar4n - comment - 13 Mar 2017

Sounds like a very similar issue to #11835 . Possibly related somehow?

avatar laoneo
laoneo - comment - 13 Mar 2017

Guess it is about the same thing.

avatar bertmert
bertmert - comment - 13 Mar 2017

Unfortunately this pr doesn't solve this issue here, the pr got merged over two months ago and we still have the issue.

I said/meant that PR #13586 is the REASON for misbehavior that we have now!! It must be reverted/corrected/whatever!!

avatar laoneo
laoneo - comment - 13 Mar 2017

Ah ok, tought this PR should solve it. @ciar4n any idea how to fix this one without reverting the behavior in #13586?

avatar ciar4n
ciar4n - comment - 13 Mar 2017

I don't think #13586 is causing this as the issue was there for some time before it (#11835).

avatar ciar4n
ciar4n - comment - 13 Mar 2017

Just looking in to this. A slightly different issue to #11835. I'll see what I can do but will probably have to revert #13586. Chosen seems to require a set width.

avatar laoneo
laoneo - comment - 13 Mar 2017

Thanks @ciar4n!!

avatar franz-wohlkoenig franz-wohlkoenig - change - 2 Apr 2017
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
avatar franz-wohlkoenig franz-wohlkoenig - close - 2 Apr 2017

Add a Comment

Login with GitHub to post a comment