No Code Attached Yet
avatar Scrabble96
Scrabble96
9 Jan 2022

Steps to reproduce the issue

Create a custom field of the type 'Text area'
In the 'General' tab, scroll down to 'Columns'. These 'columns' actually refer to the number of characters.
Type in 100 and save
Open an article where this field is available to edit

Expected result

To see the text area field 100 characters wide

Actual result

It is still the same with as other input fields - e.g. 'Text' and 'URL'.
This is because the width is set in the Isis (j3) template.css line 912 as width: 206px;
Using your browser's inspector, disable this code and view the result.
The field will more or less double in width

System information (as much as possible)

J3.10

Additional comments

In J4 the width of columns is the maximum available width based on screen size

avatar Scrabble96 Scrabble96 - open - 9 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 9 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Jan 2022
avatar pritam825
pritam825 - comment - 19 Jan 2022

@Scrabble96 , can you please post the screenshot of these, because I am worked and familiar with 4.0 and 4.1, but I can solve this issue to, can you please help me by posting the scrrenshots, thanks :)

avatar Scrabble96
Scrabble96 - comment - 20 Jan 2022

@Scrabble96 , can you please post the screenshot of these.

Here you are. The 'event description' field is a text area field. I have tried 200, 600, etc but the culprit is the text-area width code on line 912 of the Isis template.css

text-area-custom-field-cols

If you block that code, the text area custom field cols="n" comes into play:

text-area-custom-field-cols-width-unset

Here is the tool tip that appears over 'Columns' in the field setup:

text-area-custom-field-columns-tool-tip

I find it odd that the width of the field should be determined by 'characters'. Wouldn't that depend on the font being used? For example, Courier has an equal space for each character, whereas most modern fonts do not. It would be much better if this was a width setting in either px or %. That way, the inline width="n" would override the Isis template.css, I believe. It is also wrong that 'the width is determined by the browser' as it is the template.css that currently determines the width.

avatar zero-24
zero-24 - comment - 23 Jan 2022

Hmm what about setting width="auto" whin the layout that should do the trick right?

avatar Scrabble96
Scrabble96 - comment - 23 Jan 2022

Hmm what about setting width="auto" whin the layout that should do the trick right?

That sort of works for me when trying it on Firefox Inspector - it goes to maximum width of the available parent 'controls' container regardless of what figure is entered into 'cols' in the field setup. Which is probably ok if you only have one field per line.
If you don't have anything in the 'cols' field setup, changing max-width to 'auto' actually makes the field slightly smaller!

avatar Quy
Quy - comment - 25 Jan 2022

PR #26755 attempts to fix this.

avatar Scrabble96
Scrabble96 - comment - 25 Jan 2022

PR #26755 attempts to fix this.

Possibly, but nothing seems to have been done with this since August 2021. It says it's now out of date with the latest code.

avatar brianteeman
brianteeman - comment - 5 Aug 2022

The cols attribute is only of any use when the field has no width already set in css. It is really a legacy option and it does work - just not if there is any css setting a width or when the editor is set to anything but none.

avatar brianteeman
brianteeman - comment - 28 Aug 2022

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

As this issue doesn't relate to Joomla 4 it will now been closed.

If we are mistaken and this does apply to Joomla 4 please open a new issue (and reference this one if you wish) with updated details for testing in Joomla 4.
cc @zero-24

avatar alikon alikon - change - 28 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-28 09:58:36
Closed_By alikon
avatar alikon alikon - close - 28 Aug 2022

Add a Comment

Login with GitHub to post a comment