Closed (fixed)
Project:
Drupal core
Version:
9.3.x-dev
Component:
Claro theme
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Jan 2021 at 19:26 UTC
Updated:
8 Feb 2022 at 09:14 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
kvantstudio commentedComment #3
kvantstudio commentedComment #4
larowlanDoes #3191497: core/jquery.ui.dialog is missing core/jquery assets fix this?
Comment #5
kvantstudio commentedPatch https://www.drupal.org/files/issues/2021-01-07/3191497.patch does not solve the problem. I have solved it myself by modifying CSS styles in my patch.
Comment #6
bnjmnm#3191497: core/jquery.ui.dialog is missing core/jquery assets would not impact this. Were the problem surfacing here, the dialog wouldn't even open. It would only occur on pages where core/jquery.ui.dialog is literally the only jquery-using library loaded on that page.
I notice
max-contentis used in the #2 patch. Drupal will be supporting IE11 until 10 at the earliest, and max-content is not supported in IE11. Having to still consider IE11 is unpleasant to most of us. Fortunately, there are efforts being made to officially set an IE11 expiration date.There may be some variables in variables.pcss.css that can be used for the max-width value. Using an existing variable defined there provides assurance that it's consistent with Claro design and may land quicker.
Comment #7
bnjmnmThis is not a problem with all modals in Claro, so ideally the solution would be more specific to the use case that is causing the problem. I identified why this is happening in the add paragraph widget:
With this in mind, the next steps should probably be:
autoResize: false,is setautoResize: falseuse case as much as possible. The less general the fix, the less concerns there will be of side effects, and that will help this get committed sooner.Comment #8
kvantstudio commentedPatch created https://www.drupal.org/project/paragraphs/issues/3028468#comment-14105954
Comment #10
mherchelUpdating summary
Comment #11
mherchelI tracked this down to Claro disabling some jqueryui dialog CSS at https://git.drupalcode.org/project/drupal/-/blob/9.4.x/core/themes/claro...
If you comment out this code, the modal will look correct. I'm going to try to figure out why this was added and see if we can bring in the additional needed styles.
Comment #12
mherchelProper fix attached!
The issue was that the
.ui-dialogelement needed to be set toposition: absolute;. See this code within jQueryUI: https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/assets/vend...This jQueryUI CSS file is removed in
claro.info.yml, so we need to add this CSS into Claro.These patches move over the relevant CSS. Patches attached for both 9.4.x and 10.0.x
Comment #13
bnjmnmExcellent detective work! Could this fix be added to
core/themes/claro/css/components/dialog.pcss.cssinstead of the broadertheme.pcss.css? That is where the style originally was until it was removed by me 😳 in #3023311: Modal dialog style update to address an issue with the close icon not centering properly in Chrome.Fortunately, the close-button-centering in Chrome does not appear to be a problem anymore. I manually tried to reproduce the problem - different dialog configs and Zoom levels, but it seems to be addressed in the browser and we can bring back what is apparently an important bit of positioning.
Comment #14
idebr commentedAttached patch moves the additional css from components/jquery.ui/theme.pcss.css to components/dialog.pcss.css
Comment #15
bnjmnmLooks like a good fix. It brings back some default jQuery UI positioning CSS that probably shouldn't have been removed (by me) to begin with.
I imagine the change that led to this issue may have been noticed had it happened in an issue with smaller scope, but #3023311: Modal dialog style update was huge, and the change did fix an at-the-time Chrome issue.
Comment #16
mherchelAttached is the patch from #14 for 10.0.x
Comment #21
lauriiiAdding credits from #3186463: Dialog resize issue which I marked as duplicate.
Comment #22
lauriiiComment #26
lauriiiCommitted 78b86c1 and pushed to 10.0.x. Also committed 9.x patch to 9.4.x and cherry-picked to 9.3.x because Claro is experimental and this is fixing a major bug. Thanks!