mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +09:00
Adjust min-height to Prevent layout shift when CKEditor is loaded
https://xetown.com/questions/1801094
This commit is contained in:
parent
6328005ace
commit
c235f6b8b3
2 changed files with 14 additions and 4 deletions
|
|
@ -240,8 +240,7 @@ button.xefu-btn {
|
||||||
|
|
||||||
p.xefu-dropzone-message {
|
p.xefu-dropzone-message {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0;
|
margin: 0 0 0 5px !important;
|
||||||
margin-left: 5px;
|
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,18 @@
|
||||||
$filemtime2 = file_exists(RX_BASEDIR . 'common/js/plugins/ckeditor/ckeditor/config.js') ? filemtime(RX_BASEDIR . 'common/js/plugins/ckeditor/ckeditor/config.js') : 0;
|
$filemtime2 = file_exists(RX_BASEDIR . 'common/js/plugins/ckeditor/ckeditor/config.js') ? filemtime(RX_BASEDIR . 'common/js/plugins/ckeditor/ckeditor/config.js') : 0;
|
||||||
$filemtimestamp = max($filemtime1, $filemtime2, $editor_config_timestamp ?? 0);
|
$filemtimestamp = max($filemtime1, $filemtime2, $editor_config_timestamp ?? 0);
|
||||||
|
|
||||||
$editor_height_fixed = $editor_height + ($editor_toolbar_hide ? 58 : ($editor_toolbar === 'simple' ? 74 : 140));
|
// Start with fixed min-height to prevent layout shift when editor is loaded.
|
||||||
|
if ($editor_toolbar_hide):
|
||||||
|
$editor_height_fixed = $editor_height + 55;
|
||||||
|
elseif ($editor_toolbar === 'simple'):
|
||||||
|
$editor_height_fixed = $editor_height + 71;
|
||||||
|
else:
|
||||||
|
$editor_height_fixed = $editor_height + 137;
|
||||||
|
endif;
|
||||||
|
|
||||||
|
if (str_contains($_SERVER['HTTP_USER_AGENT'], 'Firefox/')):
|
||||||
|
$editor_height_fixed += 2;
|
||||||
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue