No Code Attached Yet Information Required bug
avatar crystalenka
crystalenka
12 Aug 2022

Steps to reproduce the issue

Create a calendar custom field.
Create a repeatable subform custom field.
Add the calendar field to the subform field. Save and close.

Open an article where you can edit the subform field and add some items.

Expected result

You will be able to use the calendar field normally.

Actual result

The calendar field gets cut off by the bounding box of the field container:

Screen.Recording.2022-08-12.at.16.20.01.mov

System information (as much as possible)

Joomla 4.1.5
PHP 8.0

Additional comments

Possibly just a CSS bug, but I don't have the time to check it right now so I'm opening the issue. I might be able to come back later with a PR to fix it.

avatar crystalenka crystalenka - open - 12 Aug 2022
avatar joomla-cms-bot joomla-cms-bot - change - 12 Aug 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Aug 2022
avatar crystalenka
crystalenka - comment - 12 Aug 2022

Some additional info:

  • this happens on Safari, haven't tested in other browsers yet
  • it appears to happen because of the overflow-x:auto rule on the <div class="table-responsive">. Removing that rule fixes the display of the calendar, but then the table overflows the container.
  • The best solution is probably to address the table behavior when it's too wide as horizontal scrolling is not a great UX, especially because it hides the most important column (the add/remove buttons) but that would also be a more involved solution.
avatar crystalenka
crystalenka - comment - 12 Aug 2022

This part of how bootstrap functions, apparently:

Vertical clipping/truncation

Responsive tables make use of overflow-y: hidden, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.

Source: https://getbootstrap.com/docs/5.2/content/tables/#responsive-tables

So, unless we decide not to use bootstrap responsive tables, the solution is... impossible? I don't know. Maybe we could put the calendar select in a dialog element (the relatively new native HTML modal)?

However I think this will also be a problem for dropdown fields in subforms, possibly others, so it might be worth looking at in a broader context...

avatar chmst
chmst - comment - 13 Aug 2022

Related #38346

avatar richard67 richard67 - close - 22 Jan 2023
avatar richard67
richard67 - comment - 22 Jan 2023

Closing as having a pull request. Please test #39694 . Thanks in advance.

avatar richard67 richard67 - change - 22 Jan 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-01-22 20:12:58
Closed_By richard67
avatar crystalenka
crystalenka - comment - 23 Jan 2023

@richard67 probably should reopen. The PR does not address the issue fully as it's more complex than just a line of CSS; see my earlier comments in this issue.

avatar richard67
richard67 - comment - 23 Jan 2023

@crystalenka You don’t have a button to reopen your issue when you visit it on GitHub directly and not in the issue tracker?

avatar crystalenka
crystalenka - comment - 23 Jan 2023

@richard67 I comment on mobile a lot so don't see it now (and didn't notice from the computer earlier, but could have missed it). Will take a look next time I'm on my computer. Thanks!

avatar crystalenka crystalenka - change - 24 Jan 2023
Status Closed New
Closed_Date 2023-01-22 20:12:58
Closed_By richard67
avatar crystalenka crystalenka - reopen - 24 Jan 2023
avatar 2003tanmay
2003tanmay - comment - 26 Jan 2023

@richard67 probably should reopen. The PR does not address the issue fully as it's more complex than just a line of CSS; see my earlier comments in this issue.

@crystalenka yes you are right, it is more complicated than i thought. I think I only have to fix the calendar, but as soon as I fixed the calendar it created another issue of the table overflowing the container.

avatar 2003tanmay
2003tanmay - comment - 11 Feb 2023

@crystalenka @richard67 The Field has two "predefined" layouts for displaying the subform as either a table or as a div container, as well as support for custom layouts.
Screenshot (64)

When we have more than 4 fields then subform display as a div container.
Screenshot (60)

And when we have 4 or less than 4 fields then subform display as a table.
Screenshot (62)

"div container" does not cause issue of calendar and it not overflow horizontally. "table" causing the issue of calendar and when we fix the calendar by applying overflow: visible it causes the table to overflow horizontally. So can we remove table layout and make div container layout as a default layout. I am unable to locate a file which has the logic behind when we have 4 or less then 4 field it display as a table otherwise it display as a div container. If this can be a possible solution to this issue can you please help me to find out the file location for this solution.

avatar Fedik
Fedik - comment - 13 Feb 2023

So can we remove table layout and make div container layout as a default layout.

We should not remove it.
As you found, the fix for the issue is to use default repeatable layout instead of table layout, when there calendar or fancy-select fields in subform.

And this will be possible in 4.3, #38180 added posibility to change layout.
This issue can be closed I guess.

avatar Quy Quy - change - 14 Feb 2023
Labels Added: Information Required
avatar Quy Quy - labeled - 14 Feb 2023
avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023

Add a Comment

Login with GitHub to post a comment